From: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@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 21:59:57 +0530 [thread overview]
Message-ID: <7d55b69e-f1cb-4271-a2ab-2cfd2e1947bb@oss.qualcomm.com> (raw)
In-Reply-To: <b64cfe8e-7274-4a8f-8add-ee1b60522c42@oss.qualcomm.com>
Yes. All the LPASS LPI drivers share lpi_pinctrl_probe(),
which manages the clocks through pm_clk with runtime PM, and every SoC
driver has the same runtime-only dev_pm_ops, so they should all have
the same problem.
For v2, I was thinking of two patches:
1. Move the dev_pm_ops into pinctrl-lpass-lpi.c, export it, and use it
from all the SoC drivers (no functional change).
2. Add the system sleep callbacks to the shared dev_pm_ops.
Would that be okay, or is it preferable to add the system sleep
callbacks to each SoC driver instead?
I can only test on Glymur CRD (sm8650 driver), so the other SoC drivers
would be compile-tested only.
Gopi
On 12-11-2026 17:27, Konrad Dybcio wrote:
> 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,
prev parent reply other threads:[~2026-11-12 16:30 UTC|newest]
Thread overview: 3+ 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
2026-11-12 16:29 ` Gopi Chandra Sekhar Reddy Kanala [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=7d55b69e-f1cb-4271-a2ab-2cfd2e1947bb@oss.qualcomm.com \
--to=gopi.kanala@oss.qualcomm.com \
--cc=andersson@kernel.org \
--cc=brgl@kernel.org \
--cc=konrad.dybcio@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®