Re: [PATCH v11 6/7] power: reset: add PSCR NVMEM Driver for Recording Power State Change Reasons

From: Faruque Ansari

Date: Thu Jun 25 2026 - 07:53:03 EST


Hi Oleksij,

On 18-Jun-25 5:32 PM, Oleksij Rempel wrote:
This driver utilizes the Power State Change Reasons Recording (PSCRR)
framework to store specific power state change information, such as
shutdown or reboot reasons, into a designated non-volatile memory
(NVMEM) cell.

Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
---
changes v6:
- rename pscr_reason to psc_reason
changes v5:
- avoid a build against NVMEM=m
changes v4:
- remove devicetree dependencies
---
drivers/power/reset/Kconfig | 22 +++
drivers/power/reset/Makefile | 1 +
drivers/power/reset/pscrr-nvmem.c | 254 ++++++++++++++++++++++++++++++
3 files changed, 277 insertions(+)
create mode 100644 drivers/power/reset/pscrr-nvmem.c

Tested-by: Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>

I have tested this on Qualcomm's lemans-evk and monaco-evk platforms.

The testing was performed across the following scenarios:

Userspace sys node to set reboot parameter
- Tested the userspace node interface used to configure the reboot
parameter confirmed that the parameter is applied correctly and
visible post reboot by reading back the sysfs node.

Overtemperature shutdown
- Simulated fake over-temperature condition and verified that
proper reason is being reflected in the sysfs node post reboot.

I did not observe any functional issues during testing on either of platforms.

Thanks for this patch - it is helpful for us as well.

Best regards,
Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>