[PATCH v3 2/2] power: reset: at91-reset: add sysfs interface to the power on reason

Sebastian Reichel sebastian.reichel at collabora.com
Mon Jun 19 14:44:04 PDT 2023


Hi,

On Fri, Jun 16, 2023 at 03:52:52PM +0200, Miquel Raynal wrote:
> ...
> diff --git a/include/linux/power/power_on_reason.h b/include/linux/power/power_on_reason.h
> new file mode 100644
> index 000000000000..a59d035f1a77
> --- /dev/null
> +++ b/include/linux/power/power_on_reason.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0-only */
> +/*
> + * Author: Kamel Bouhra <kamel.bouhara at bootlin.com>
> + */
> +
> +#ifndef POWER_ON_REASON_H
> +#define POWER_ON_REASON_H
> +
> +#define POWER_ON_REASON_REGULAR "regular power-up"
> +#define POWER_ON_REASON_RTC "RTC wakeup"
> +#define POWER_ON_REASON_WATCHDOG "watchdog timeout"
> +#define POWER_ON_REASON_SOFTWARE "software reset"
> +#define POWER_ON_REASON_RST_BTN "reset button action"
> +#define POWER_ON_REASON_CPU_CLK_FAIL "CPU clock failure"
> +#define POWER_ON_REASON_XTAL_FAIL "crystal oscillator failure"
> +#define POWER_ON_REASON_LOW_POWER "low-power condition"

IIUIC from previous discussion this should be:

#define POWER_ON_REASON_BROWN_OUT "brown-out reset"

> +#define POWER_ON_REASON_UNKNOWN "unknown reason"
> +
> +#endif /* POWER_ON_REASON_H */

Otherwise LGTM.

-- Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230619/3ed307b0/attachment.sig>


More information about the linux-arm-kernel mailing list