From: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
To: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Bjorn Andersson <andersson@kernel.org>,
Linus Walleij <linusw@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/2] pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM
Date: Wed, 13 May 2026 19:19:59 +0530 [thread overview]
Message-ID: <407abe2a-3a82-40a2-8072-24ba927bfd99@oss.qualcomm.com> (raw)
In-Reply-To: <b2e69a76-e484-4b48-a0a6-89279e597da1@oss.qualcomm.com>
On 5/8/2026 7:10 PM, Konrad Dybcio wrote:
> On 5/8/26 1:36 PM, Ajay Kumar Nandam wrote:
>> Convert the LPASS LPI pinctrl driver to use the PM clock framework for
>> runtime power management.
>>
>> This allows the LPASS LPI pinctrl driver to drop clock votes when idle,
>> improves power efficiency on platforms using LPASS LPI island mode, and
>> aligns the driver with common runtime PM patterns used across Qualcomm
>> LPASS subsystems.
>>
>> Guard GPIO register read/write helpers and slew-rate register programming
>> with synchronous runtime PM calls so the device is active during MMIO
>> operations whenever autosuspend is enabled.
>>
>> Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
>> ---
>
> [...]
>
>> for (i = 0; i < g->nfuncs; i++) {
>> if (g->funcs[i] == function)
>> @@ -119,7 +133,9 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
>> return -EINVAL;
>>
>> mutex_lock(&pctrl->lock);
>> - val = lpi_gpio_read(pctrl, pin, LPI_GPIO_CFG_REG);
>> + ret = lpi_gpio_read(pctrl, pin, LPI_GPIO_CFG_REG, &val);
>> + if (ret)
>> + goto unlock;
>
> Please remove the mutex_unlock/goto calls and replace the
> mutex_lock with guard(mutex)(&pctrl->lock) instead. This will use
> the scoped cleanup mechanism and let you simply return directly,
> shrinking the diff
ACK, will update in next version.
>
> [...]
>
>> + pm_runtime_set_autosuspend_delay(dev, 100);
>> + pm_runtime_use_autosuspend(dev);
>> + devm_pm_runtime_enable(dev);
>
> devm_pm_runtime_enable() can fail, please check its return code
>
> nota bene pm_runtime_put_autosuspend() also can, but it's much less of
> a problem
ACK, will update in next version
Thanks
Ajay Kumar Nandam
>
> I gave this patchset a spin on 8280 CRD and seems to work fine, nice!
>
> Konrad
next prev parent reply other threads:[~2026-05-13 13:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 11:36 [PATCH v3 0/2] pinctrl: qcom: lpass-lpi: Switch to PM clock framework Ajay Kumar Nandam
2026-05-08 11:36 ` [PATCH v3 1/2] pinctrl: qcom: lpass-lpi: Enable runtime PM hooks on remaining SoCs Ajay Kumar Nandam
2026-05-08 13:41 ` Konrad Dybcio
2026-05-13 13:50 ` Ajay Kumar Nandam
2026-05-13 12:48 ` Dmitry Baryshkov
2026-05-13 13:55 ` Ajay Kumar Nandam
2026-05-08 11:36 ` [PATCH v3 2/2] pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM Ajay Kumar Nandam
2026-05-08 13:40 ` Konrad Dybcio
2026-05-13 13:49 ` Ajay Kumar Nandam [this message]
2026-05-13 12:25 ` [PATCH v4 0/2] pinctrl: qcom: lpass-lpi: Switch to PM clock framework Ajay Kumar Nandam
2026-05-13 12:25 ` [PATCH v4 1/2] pinctrl: qcom: lpass-lpi: Enable runtime PM hooks on LPASS LPI SoCs Ajay Kumar Nandam
2026-05-13 12:51 ` Dmitry Baryshkov
2026-05-13 13:53 ` Ajay Kumar Nandam
2026-05-13 12:25 ` [PATCH v4 2/2] pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM Ajay Kumar Nandam
2026-05-13 12:52 ` Dmitry Baryshkov
2026-05-13 13:53 ` Ajay Kumar Nandam
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=407abe2a-3a82-40a2-8072-24ba927bfd99@oss.qualcomm.com \
--to=ajay.nandam@oss.qualcomm.com \
--cc=andersson@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 \
/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