What:		/sys/kernel/pscrr/
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		Root directory of the Power State Change Reason Recording
		(PSCRR) framework. It contains one subdirectory per registered
		reason provider, named providerN (N is an arbitrary, stable
		index assigned at registration).

		A provider is either a hardware reason source (a PMIC, SoC
		reset controller or watchdog exposing a reset cause) or a
		recorder that persists the current reason across a power cycle
		(e.g. an NVMEM or RTC scratch cell). The set of reasons is
		deliberately not collapsed to a single "winning" cause, since
		resets are often multi-causal.

What:		/sys/kernel/pscrr/providerN/name
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		(RO) Human-readable label identifying the provider, e.g.
		"pca9450" or "nvmem".

What:		/sys/kernel/pscrr/providerN/device
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		Symbolic link to the backing struct device of the provider.
		Present only for providers that are bound to a device.

What:		/sys/kernel/pscrr/providerN/reason
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		The set of power state change reasons observed by this
		provider, as a space-separated list of reason tokens (an
		empty line means no reason is recorded).

		The attribute is writable only for providers that can record
		a reason; for a pure hardware source it is read-only. A write
		records one reason and accepts either a reason token or its
		decimal index. The tokens and their stable numeric values are:

		==  =================  ============================================
		0   unknown            Unknown or unspecified reason
		1   under-voltage      Supply voltage dropped below a safe level
		2   over-current       Excessive current draw / possible short
		3   regulator-failure  Voltage regulator failure
		4   over-temperature   Unsafe temperature detected
		5   ec-panic           Embedded controller (EC) panic
		6   power-on           Regular cold power-on
		7   watchdog           Watchdog timeout
		8   software           Software-initiated reset or reboot
		9   external           External reset input asserted
		10  rtc                RTC-triggered wake-up or power-on
		11  reset-button       User reset button
		12  cpu-clock-failure  CPU clock failure
		13  crystal-failure    Crystal oscillator failure
		==  =================  ============================================

		The numeric order is stable ABI: new reasons are only ever
		appended. A provider may support only a subset of these; see
		"supported_reasons".

What:		/sys/kernel/pscrr/providerN/caps
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		(RO) Space-separated list of the provider's non-default
		capabilities. Being readable and storing a single reason are
		the defaults and are not listed. Currently defined:

		========  ==============================================
		writable  the provider can record a reason (see "reason"
		          and "record_policy")
		========  ==============================================

		An empty line therefore denotes a read-only, single-slot
		provider.

What:		/sys/kernel/pscrr/providerN/supported_reasons
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		(RO) Space-separated list of the reason tokens (see "reason")
		this provider is able to report or record. A provider that
		supports every reason lists them all.

What:		/sys/kernel/pscrr/providerN/record_policy
Date:		July 2026
KernelVersion:	7.2
Contact:	Oleksij Rempel <o.rempel@pengutronix.de>
Description:
		(RW) Policy used when more than one reason is recorded during a
		single power cycle. Present only for providers that can record
		(see "caps"). Valid values are:

		=====  =================================================
		first  keep the first reason recorded this cycle (the
		       root cause); this is the default
		last   overwrite with the most recently recorded reason
		=====  =================================================
