[PATCH v2 0/3] pinctrl: qcom: lpass-lpi: Switch to PM clock framework

Ajay Kumar Nandam posted 3 patches 1 month, 3 weeks ago
There is a newer version of this series
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c      | 48 ++++++++++++-------
.../pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c   |  7 +++
.../pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 11 ++++-
.../pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c   |  7 +++
.../pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c   |  7 +++
.../pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c   | 11 ++++-
.../pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c   | 11 ++++-
.../pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c   | 11 ++++-
.../pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c   | 11 ++++-
9 files changed, 97 insertions(+), 27 deletions(-)
[PATCH v2 0/3] pinctrl: qcom: lpass-lpi: Switch to PM clock framework
Posted by Ajay Kumar Nandam 1 month, 3 weeks ago
This series moves LPASS LPI pinctrl runtime clock control to the PM
clock framework and ensures GPIO register accesses runtime-resume the
block before MMIO.

The common LPASS LPI core now uses PM clocks and autosuspend. Runtime PM
callbacks are wired for all LPASS LPI variant drivers sharing the common
core so behavior is consistent across SoCs using DT-provided clocks via
of_pm_clk_add_clks().

---
v1: lore.kernel.org/r/20260413122233.375945-1-ajay.nandam@oss.qualcomm.com

Changes since v1:
- Kept GPIO helper return type adjustments in the runtime PM access
  patch and switched access paths to pm_runtime_resume_and_get()
- Added runtime PM callback wiring for remaining LPASS LPI SoC drivers
  (sc8280xp, sm4250, sm6115, sm8250, sm8450, sm8550, sm8650)
- Addressed style nits in GPIO access helper declaration formatting

Testing:
- Runtime behavior validated on Kodiak (sc7280)
- Other LPASS LPI variants compile-tested; wider runtime testing welcome

Ajay Kumar Nandam (3):
  pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM
  pinctrl: qcom: lpass-lpi: Enable runtime PM hooks on remaining SoCs
  pinctrl: qcom: lpass-lpi: Resume clocks for GPIO access

 drivers/pinctrl/qcom/pinctrl-lpass-lpi.c      | 48 ++++++++++++-------
 .../pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c   |  7 +++
 .../pinctrl/qcom/pinctrl-sc8280xp-lpass-lpi.c | 11 ++++-
 .../pinctrl/qcom/pinctrl-sm4250-lpass-lpi.c   |  7 +++
 .../pinctrl/qcom/pinctrl-sm6115-lpass-lpi.c   |  7 +++
 .../pinctrl/qcom/pinctrl-sm8250-lpass-lpi.c   | 11 ++++-
 .../pinctrl/qcom/pinctrl-sm8450-lpass-lpi.c   | 11 ++++-
 .../pinctrl/qcom/pinctrl-sm8550-lpass-lpi.c   | 11 ++++-
 .../pinctrl/qcom/pinctrl-sm8650-lpass-lpi.c   | 11 ++++-
 9 files changed, 97 insertions(+), 27 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/3] pinctrl: qcom: lpass-lpi: Switch to PM clock framework
Posted by Konrad Dybcio 1 month, 3 weeks ago
On 4/20/26 2:31 PM, Ajay Kumar Nandam wrote:
> This series moves LPASS LPI pinctrl runtime clock control to the PM
> clock framework and ensures GPIO register accesses runtime-resume the
> block before MMIO.
> 
> The common LPASS LPI core now uses PM clocks and autosuspend. Runtime PM
> callbacks are wired for all LPASS LPI variant drivers sharing the common
> core so behavior is consistent across SoCs using DT-provided clocks via
> of_pm_clk_add_clks().
> 
> ---
> v1: lore.kernel.org/r/20260413122233.375945-1-ajay.nandam@oss.qualcomm.com
> 
> Changes since v1:
> - Kept GPIO helper return type adjustments in the runtime PM access
>   patch and switched access paths to pm_runtime_resume_and_get()
> - Added runtime PM callback wiring for remaining LPASS LPI SoC drivers
>   (sc8280xp, sm4250, sm6115, sm8250, sm8450, sm8550, sm8650)
> - Addressed style nits in GPIO access helper declaration formatting

Each patch must be self-contained and not break functionality or build,
so that bisect always works

If I only apply patch 1, non-7280 platforms will still regress because
the changes made in patch 1 require that pm_ops is set for the clocks
to get enabled (otherwise it'll just autosuspend 100ms after probe and
any subsequent accesses will crash the device)

Konrad
Re: [PATCH v2 0/3] pinctrl: qcom: lpass-lpi: Switch to PM clock framework
Posted by Ajay Kumar Nandam 1 month, 3 weeks ago

On 4/22/2026 4:29 PM, Konrad Dybcio wrote:
> On 4/20/26 2:31 PM, Ajay Kumar Nandam wrote:
>> This series moves LPASS LPI pinctrl runtime clock control to the PM
>> clock framework and ensures GPIO register accesses runtime-resume the
>> block before MMIO.
>>
>> The common LPASS LPI core now uses PM clocks and autosuspend. Runtime PM
>> callbacks are wired for all LPASS LPI variant drivers sharing the common
>> core so behavior is consistent across SoCs using DT-provided clocks via
>> of_pm_clk_add_clks().
>>
>> ---
>> v1: lore.kernel.org/r/20260413122233.375945-1-ajay.nandam@oss.qualcomm.com
>>
>> Changes since v1:
>> - Kept GPIO helper return type adjustments in the runtime PM access
>>    patch and switched access paths to pm_runtime_resume_and_get()
>> - Added runtime PM callback wiring for remaining LPASS LPI SoC drivers
>>    (sc8280xp, sm4250, sm6115, sm8250, sm8450, sm8550, sm8650)
>> - Addressed style nits in GPIO access helper declaration formatting
> 
> Each patch must be self-contained and not break functionality or build,
> so that bisect always works
> 
> If I only apply patch 1, non-7280 platforms will still regress because
> the changes made in patch 1 require that pm_ops is set for the clocks
> to get enabled (otherwise it'll just autosuspend 100ms after probe and
> any subsequent accesses will crash the device)
> 

Agreed on bisect safety, will reorder the series in the next version.

Thanks
Ajay Kumar Nandam

> Konrad