[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gfOaCvsxX5QFzgcTeEZgWGZvqJ3C9d8_Pu6pSp=78m9Q@mail.gmail.com>
Date: Fri, 19 Jan 2024 19:34:26 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Sebastian Reichel <sre@...nel.org>, Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>, "Rafael J. Wysocki" <rafael@...nel.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>,
Lukasz Luba <lukasz.luba@....com>, linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
Søren Andersen <san@...v.dk>
Subject: Re: [RFC PATCH v1 7/7] thermal: core: set Power State Change Reason
before hw_protection_shutdown()
On Fri, Jan 19, 2024 at 2:25 PM Oleksij Rempel <o.rempel@...gutronix.de> wrote:
>
> Store the state change reason to some black box for later investigation.
Seriously?
What black box, where, how this is useful and who is going to use it,
pretty please.
> Signed-off-by: Oleksij Rempel <o.rempel@...gutronix.de>
> ---
> drivers/thermal/thermal_core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 9c17d35ccbbd..5ee3a59d7a0e 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -16,6 +16,7 @@
> #include <linux/kdev_t.h>
> #include <linux/idr.h>
> #include <linux/thermal.h>
> +#include <linux/pscr.h>
> #include <linux/reboot.h>
> #include <linux/string.h>
> #include <linux/of.h>
> @@ -325,6 +326,7 @@ void thermal_zone_device_critical(struct thermal_zone_device *tz)
> dev_emerg(&tz->device, "%s: critical temperature reached, "
> "shutting down\n", tz->type);
>
> + set_power_state_change_reason(PSCR_OVERTEMPERATURE);
> hw_protection_shutdown("Temperature too high", poweroff_delay_ms);
> }
> EXPORT_SYMBOL(thermal_zone_device_critical);
> --
> 2.39.2
>
Powered by blists - more mailing lists