[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <548e2f24-a51e-4593-9463-09506488c70e@linaro.org>
Date: Mon, 22 Jan 2024 15:32:44 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Priyansh Jain <quic_priyjain@...cinc.com>,
Amit Kucheria <amitk@...nel.org>, Thara Gopinath <thara.gopinath@...il.com>,
Bjorn Andersson <andersson@...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,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: quic_manafm@...cinc.com
Subject: Re: [PATCH] thermal/drivers/tsens: Add suspend to RAM support for
tsens
On 22.01.2024 11:07, Priyansh Jain wrote:
> Add suspend callback support for tsens which disables tsens interrupts
> in suspend to RAM callback.
Would it not be preferrable to have the "critical overheat", wakeup-
capable interrupts be enabled, even if the system is suspended?
> Add resume callback support for tsens which reinitializes tsens hardware
> and enables back tsens interrupts in resume callback.
>
> Signed-off-by: Priyansh Jain <quic_priyjain@...cinc.com>
> ---
[...]
> +
> +int tsens_suspend_common(struct tsens_priv *priv)
> +{
> + switch (pm_suspend_target_state) {
> + case PM_SUSPEND_MEM:
> + if (priv->combo_irq > 0) {
> + disable_irq_nosync(priv->combo_irq);
> + disable_irq_wake(priv->combo_irq);
> + }
> +
> + if (priv->uplow_irq > 0) {
> + disable_irq_nosync(priv->uplow_irq);
> + disable_irq_wake(priv->uplow_irq);
> + }
> +
> + if (priv->crit_irq > 0) {
> + disable_irq_nosync(priv->crit_irq);
> + disable_irq_wake(priv->crit_irq);
> + }
> + break;
> + default:
> + break;
> + }
if (pm_suspend_target_state != PM_SUSPEND_MEM)
return 0;
<rest of the code>
[...]
>
> + /* For saving irq number to re-use later */
This is rather self-explanatory
Konrad
Powered by blists - more mailing lists