* [PATCH] pinctrl: qcom: sm8650-lpass-lpi: Force runtime suspend on system sleep
@ 2026-11-12 10:51 Gopi Chandra Sekhar Reddy Kanala via B4 Relay
2026-11-12 11:57 ` Konrad Dybcio
0 siblings, 1 reply; 3+ messages in thread
From: Gopi Chandra Sekhar Reddy Kanala via B4 Relay @ 2026-11-12 10:51 UTC (permalink / raw)
To: Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
Cc: Srinivas Kandagatla, linux-arm-msm, linux-gpio, linux-kernel,
Gopi Chandra Sekhar Reddy Kanala
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.
---
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,
--
Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: qcom: sm8650-lpass-lpi: Force runtime suspend on system sleep
2026-11-12 10:51 [PATCH] pinctrl: qcom: sm8650-lpass-lpi: Force runtime suspend on system sleep 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
0 siblings, 1 reply; 3+ messages in thread
From: Konrad Dybcio @ 2026-11-12 11:57 UTC (permalink / raw)
To: gopi.kanala, Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
Cc: Srinivas Kandagatla, linux-arm-msm, linux-gpio, linux-kernel
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: qcom: sm8650-lpass-lpi: Force runtime suspend on system sleep
2026-11-12 11:57 ` Konrad Dybcio
@ 2026-11-12 16:29 ` Gopi Chandra Sekhar Reddy Kanala
0 siblings, 0 replies; 3+ messages in thread
From: Gopi Chandra Sekhar Reddy Kanala @ 2026-11-12 16:29 UTC (permalink / raw)
To: Konrad Dybcio, Bjorn Andersson, Bartosz Golaszewski, Linus Walleij
Cc: Srinivas Kandagatla, linux-arm-msm, linux-gpio, linux-kernel
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,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-12 16:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-12 10:51 [PATCH] pinctrl: qcom: sm8650-lpass-lpi: Force runtime suspend on system sleep 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 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®