power: pmic: pca9450: Add support for reset status
authorPrimoz Fiser <primoz.fiser@norik.com>
Thu, 28 Aug 2025 11:24:05 +0000 (13:24 +0200)
committerPeng Fan <peng.fan@nxp.com>
Mon, 1 Sep 2025 02:33:09 +0000 (10:33 +0800)
commitad197b31b3f88d53c349995d8bbaeba4b18b8f2b
tree02c7c6d56f5b2768ff7f7e88f816d296b38115a2
parent9065b87f35018a4e993e7dfb8a8ec29474785f76
power: pmic: pca9450: Add support for reset status

PCA9450 PMIC supports reading the reset status from the PWRON_STAT
register. Bits 7-4 give indication of the PMIC reset cause:

 - PWRON (BIT7) - Power ON triggered by PMIC_ON_REQ input line,
 - WDOGB (BIT6) - Boot after cold reset by WDOGB pin (watchdog reset),
 - SW_RST (BIT5) - Boot after cold reset initiated by the software,
 - PMIC_RST (BIT4) - Boot after PMIC_RST_B input line trigger.

Add support for reading reset status via the sysreset framework in a
convenient printable format.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
Reviewed-by: Paul Geurts <paul.geurts@prodrive-technologies.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
drivers/power/pmic/pca9450.c
include/power/pca9450.h