mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: gopi.kanala@oss.qualcomm.com,
	Bjorn Andersson <andersson@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	Linus Walleij <linusw@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: qcom: sm8650-lpass-lpi: Force runtime suspend on system sleep
Date: Thu, 12 Nov 2026 12:57:27 +0100	[thread overview]
Message-ID: <b64cfe8e-7274-4a8f-8add-ee1b60522c42@oss.qualcomm.com> (raw)
In-Reply-To: <20261112-lpass-lpi-system-sleep-v1-1-438cb997e0e9@oss.qualcomm.com>

On 11/12/26 11:51 AM, Gopi Chandra Sekhar Reddy Kanala via B4 Relay wrote:
> From: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
> 
> The LPASS LPI pin controller votes for the LPASS HW_MACRO and HW_DCODEC
> clocks through pm_clk and only implements runtime PM callbacks. Its
> consumers, such as the SoundWire controllers, keep it runtime active
> through their device links. If a consumer is active when system suspend
> starts, or is resumed during it, the runtime PM usage count the PM core
> holds from the prepare phase keeps the pin controller from runtime
> suspending, and both clock votes are held for the whole suspend. On
> Glymur CRD this keeps CX and DDR from collapsing in s2idle.
> 
> Use pm_runtime_force_suspend() and pm_runtime_force_resume() as the
> system sleep callbacks so the clocks are always released at system
> suspend. Consumers are suspended before their suppliers, so the pin
> controller goes down after them and comes back before them.
> 
> Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
> ---
> Tested on Glymur CRD with next-20261110. When s2idle is entered right
> after playback, the LPI clock votes are now released during suspend,
> after the SoundWire controllers, and restored before them on resume.
> Playback works after resume.
> ---

Should this extend to all other pinctrl-xxx-lpass-lpi drivers?

Konrad

>  drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c
> index bc7889c993d0..e33d4360c094 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c
> @@ -220,6 +220,7 @@ static const struct of_device_id lpi_pinctrl_of_match[] = {
>  MODULE_DEVICE_TABLE(of, lpi_pinctrl_of_match);
>  
>  static const struct dev_pm_ops lpi_pinctrl_pm_ops = {
> +	SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
>  	RUNTIME_PM_OPS(pm_clk_suspend, pm_clk_resume, NULL)
>  };
>  
> 
> ---
> base-commit: 793807ca13bf3072fc6d16ce6d90e9ab9beff2a5
> change-id: 20261112-lpass-lpi-system-sleep-70c4d2239abe
> 
> Best regards,

      reply	other threads:[~2026-11-12 11:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-12 10:51 Gopi Chandra Sekhar Reddy Kanala via B4 Relay
2026-11-12 11:57 ` Konrad Dybcio [this message]

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=b64cfe8e-7274-4a8f-8add-ee1b60522c42@oss.qualcomm.com \
    --to=konrad.dybcio@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=brgl@kernel.org \
    --cc=gopi.kanala@oss.qualcomm.com \
    --cc=linusw@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srini@kernel.org \
    /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

all inboxes | Powered by JetHome®