Hello all, This patch series introduces the Power State Change Reasons (PSCR) tracking framework and its related components into the kernel. The PSCR framework is designed for systems where traditional methods of storing power state change reasons, like PMICs or watchdogs, are inadequate. It provides a structured way to store reasons for system shutdowns and reboots, such as under-voltage or software-triggered events, in non-volatile hardware storage. These changes are critical for systems requiring detailed postmortem analysis and where immediate power-down scenarios limit traditional storage options. The framework also assists bootloaders and early-stage system components in making informed recovery decisions. Oleksij Rempel (7): dt-bindings: power: reset: add generic PSCR binding trackers power: reset: Introduce PSCR Tracking Framework for Non-Volatile Storage dt-bindings: power: reset: add bindings for NVMEM hardware storing PSCR Data nvmem: provide consumer access to cell size metrics power: reset: add PSCR NVMEM Driver for Storing Power State Change Reasons regulator: set Power State Change Reason before hw_protection_shutdown() thermal: core: set Power State Change Reason before hw_protection_shutdown() .../bindings/power/reset/pscr-nvmem.yaml | 54 ++++ .../devicetree/bindings/power/reset/pscr.yaml | 51 ++++ drivers/nvmem/core.c | 25 ++ drivers/power/reset/Kconfig | 30 ++ drivers/power/reset/Makefile | 2 + drivers/power/reset/pscr-nvmem.c | 100 +++++++ drivers/power/reset/pscr.c | 259 ++++++++++++++++++ drivers/regulator/core.c | 6 + drivers/thermal/thermal_core.c | 2 + include/linux/nvmem-consumer.h | 7 + include/linux/pscr.h | 40 +++ 11 files changed, 576 insertions(+) create mode 100644 Documentation/devicetree/bindings/power/reset/pscr-nvmem.yaml create mode 100644 Documentation/devicetree/bindings/power/reset/pscr.yaml create mode 100644 drivers/power/reset/pscr-nvmem.c create mode 100644 drivers/power/reset/pscr.c create mode 100644 include/linux/pscr.h -- 2.39.2