power: reset: at91-reset: add sysfs interface to the power on reason
authorKamel Bouhara <kamel.bouhara@bootlin.com>
Tue, 20 Jun 2023 06:26:57 +0000 (08:26 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 19 Jul 2023 21:15:21 +0000 (23:15 +0200)
commitd40befed9a581740f6ceb0e5998ec2f59bfbc559
treef3e86211c054264c3cdb4c78318d3ec7dc04c2af
parent7b9fc309c0b57c5b1230bf3e0a8bb9e937eb6529
power: reset: at91-reset: add sysfs interface to the power on reason

Introduce a list of generic reset sources and use them to export the
power on reason through sysfs. Update the ABI documentation to describe
this new interface.

Signed-off-by: Kamel Bouhara <kamel.bouhara@bootlin.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
[Miquel Raynal: Follow-up on Kamel's work, 4 years later]
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Documentation/ABI/testing/sysfs-platform-power-on-reason [new file with mode: 0644]
drivers/power/reset/at91-reset.c
include/linux/power/power_on_reason.h [new file with mode: 0644]