linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@linaro.org>
To: Priyansh Jain <quic_priyjain@quicinc.com>,
	Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	Bjorn Andersson <andersson@kernel.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: quic_manafm@quicinc.com
Subject: Re: [PATCH] thermal/drivers/tsens: Add suspend to RAM support for tsens
Date: Mon, 22 Jan 2024 15:32:44 +0100	[thread overview]
Message-ID: <548e2f24-a51e-4593-9463-09506488c70e@linaro.org> (raw)
In-Reply-To: <20240122100726.16993-1-quic_priyjain@quicinc.com>

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@quicinc.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

  parent reply	other threads:[~2024-01-22 14:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-22 10:07 [PATCH] thermal/drivers/tsens: Add suspend to RAM support for tsens Priyansh Jain
2024-01-22 13:54 ` Dmitry Baryshkov
2024-01-24 10:37   ` Priyansh Jain
2024-01-22 14:32 ` Konrad Dybcio [this message]
2024-01-24 10:42   ` Priyansh Jain
2024-01-24 12:34     ` Konrad Dybcio
2024-01-24 15:25       ` Priyansh Jain
2024-01-25 11:08         ` Konrad Dybcio
2024-01-27 15:37           ` Manaf Meethalavalappu Pallikunhi
2024-02-23  5:20             ` Priyansh Jain
2024-01-27 20:11         ` Amit Kucheria
2024-02-27 16:06           ` Priyansh Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548e2f24-a51e-4593-9463-09506488c70e@linaro.org \
    --to=konrad.dybcio@linaro.org \
    --cc=amitk@kernel.org \
    --cc=andersson@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=quic_manafm@quicinc.com \
    --cc=quic_priyjain@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).