public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/7] Introduction of PSCR Framework and Related Components
@ 2025-03-10 10:37 Oleksij Rempel
  2025-03-10 10:37 ` [PATCH v5 1/7] power: Extend power_on_reason.h for upcoming PSCRR framework Oleksij Rempel
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Oleksij Rempel @ 2025-03-10 10:37 UTC (permalink / raw)
  To: Sebastian Reichel, Srinivas Kandagatla
  Cc: Oleksij Rempel, kernel, linux-kernel, Liam Girdwood, Mark Brown,
	Rafael J. Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
	linux-pm, Søren Andersen

changes v5:
- fix compile with NVMEM=n and potential issues with NVMEM=m

changes v4:
- fix compile with CONFIG_PSCRR=n

changes v3
- rework to remove devicetree dependencies
- extend NVMEM to search devices and cells by names.

changes v2:
- rename the framework from PSCR to PSCRR (last R is for Recorder)
- extend power on reason header and use it to show detected reason on
  system start and in sysfs.
- remove "unknow" reason
- rebase on top of v6.8-rc1
- yaml fixes
- zero reason state on boot

Hello all,

This patch series introduces the Power State Change Reasons Recording
(PSCRR) 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):
  power: Extend power_on_reason.h for upcoming PSCRR framework
  power: reset: Introduce PSCR Recording Framework for Non-Volatile
    Storage
  nvmem: provide consumer access to cell size metrics
  nvmem: add support for device and sysfs-based cell lookups
  power: reset: add PSCR NVMEM Driver for Recording Power State Change
    Reasons
  regulator: set Power State Change Reason before
    hw_protection_shutdown()
  thermal: core: Record PSCR before hw_protection_shutdown()

 drivers/nvmem/core.c                  | 116 ++++++++
 drivers/power/reset/Kconfig           |  30 ++
 drivers/power/reset/Makefile          |   2 +
 drivers/power/reset/pscrr-nvmem.c     | 254 ++++++++++++++++
 drivers/power/reset/pscrr.c           | 408 ++++++++++++++++++++++++++
 drivers/regulator/core.c              |   6 +
 drivers/thermal/thermal_core.c        |   3 +
 include/linux/nvmem-consumer.h        |  21 ++
 include/linux/power/power_on_reason.h |   3 +
 include/linux/pscrr.h                 |  89 ++++++
 10 files changed, 932 insertions(+)
 create mode 100644 drivers/power/reset/pscrr-nvmem.c
 create mode 100644 drivers/power/reset/pscrr.c
 create mode 100644 include/linux/pscrr.h

--
2.39.5


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-03-18 19:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 10:37 [PATCH v5 0/7] Introduction of PSCR Framework and Related Components Oleksij Rempel
2025-03-10 10:37 ` [PATCH v5 1/7] power: Extend power_on_reason.h for upcoming PSCRR framework Oleksij Rempel
2025-03-10 10:37 ` [PATCH v5 2/7] power: reset: Introduce PSCR Recording Framework for Non-Volatile Storage Oleksij Rempel
2025-03-10 10:37 ` [PATCH v5 3/7] nvmem: provide consumer access to cell size metrics Oleksij Rempel
2025-03-10 10:37 ` [PATCH v5 4/7] nvmem: add support for device and sysfs-based cell lookups Oleksij Rempel
2025-03-10 10:37 ` [PATCH v5 5/7] power: reset: add PSCR NVMEM Driver for Recording Power State Change Reasons Oleksij Rempel
2025-03-10 10:37 ` [PATCH v5 6/7] regulator: set Power State Change Reason before hw_protection_shutdown() Oleksij Rempel
2025-03-14 10:26   ` kernel test robot
2025-03-18 12:36   ` kernel test robot
2025-03-10 10:37 ` [PATCH v5 7/7] thermal: core: Record PSCR " Oleksij Rempel
2025-03-18 19:33   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox