Re: [PATCH v17 4/6] reboot: extend psc_reason with power-on and reset causes
From: Daniel Lezcano
Date: Mon Oct 19 2026 - 04:00:05 EST
On 10/19/26 09:38, Faruque Ansari wrote:
psc_reason covered only the protection reasons. Extend it to mirror the
full POWER_ON_REASON_* vocabulary - power-on, watchdog, software,
external, RTC, reset button, CPU clock and crystal failures - so a
provider can report why the system last powered on, not only why it was
shut down. New values are appended to keep the existing numeric ABI.
Co-developed-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
Reviewed-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
Reviewed-by: Bradley Morgan <brads@xxxxxxxxxxxxxx>
Signed-off-by: Faruque Ansari <faruque.ansari@xxxxxxxxxxxxxxxx>
changes v16:
- Add Reviewed-by tag from Bradley Morgan.
changes v15:
- add a static_assert() tying ARRAY_SIZE(psc_reason_descs) to
PSCR_REASON_COUNT, so a future enum addition without a matching
table entry fails the build instead of silently reading a hole
(Matti Vaittinen)
- Add Reviewed-by tags from Matti Vaittinen.
changes v12:
- new patch
---
Reviewed-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxxxxxxxx>