Re: [PATCH v5 2/2] pinctrl: qcom: lpass-lpi: Switch to PM clock framework for runtime PM
From: Konrad Dybcio
Date: Fri May 22 2026 - 07:29:41 EST
On 5/13/26 4:00 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@xxxxxxxxxxxxxxxx>
> ---
Looks good now, couple of style nits since I asked for another revision:
[...]
> @@ -107,8 +118,8 @@ static int lpi_gpio_set_mux(struct pinctrl_dev *pctldev, unsigned int function,
> {
> struct lpi_pinctrl *pctrl = pinctrl_dev_get_drvdata(pctldev);
> const struct lpi_pingroup *g = &pctrl->data->groups[group];
> - u32 val;
> - int i, pin = g->pin;
> + u32 val, io_val;
> + int i, pin = g->pin, ret;
reverse-Christmas-tree ordering would be neat
[...]
> u32p_replace_bits(&val, i, LPI_GPIO_FUNCTION_MASK);
> - lpi_gpio_write(pctrl, pin, LPI_GPIO_CFG_REG, val);
> - mutex_unlock(&pctrl->lock);
> -
> - return 0;
> + return lpi_gpio_write(pctrl, pin, LPI_GPIO_CFG_REG, val);
A \n before return statements is customary
> }
>
> static const struct pinmux_ops lpi_gpio_pinmux_ops = {
> @@ -162,11 +178,15 @@ static int lpi_config_get(struct pinctrl_dev *pctldev,
> unsigned int param = pinconf_to_config_param(*config);
> struct lpi_pinctrl *state = dev_get_drvdata(pctldev->dev);
> unsigned int arg = 0;
> + int ret;
> int is_out;
> int pull;
> u32 ctl_reg;
ditto
[...]
> @@ -206,7 +226,7 @@ static int lpi_config_set_slew_rate(struct lpi_pinctrl *pctrl,
> {
> unsigned long sval;
> void __iomem *reg;
> - int slew_offset;
> + int slew_offset, ret;
ditto
[...]
> diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
> index 750f410311a8..a61df10d46cb 100644
> --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
> +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c
As noted, please move to patch1
Konrad