Re: [PATCH v6 2/6] mux: gpio: add optional regulator support
From: Johan Hovold
Date: Thu May 08 2025 - 08:46:12 EST
On Wed, Apr 02, 2025 at 10:05:14AM +0200, Johan Hovold wrote:
> On Thu, Mar 27, 2025 at 10:06:29AM +0000, Srinivas Kandagatla wrote:
> > From: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
> >
> > Some of the external muxes needs powering up using a regulator.
> > This is the case with Lenovo T14s laptop which has a external audio mux
> > to handle US/EURO headsets.
> >
> > Add support to the driver to handle this optional regulator.
> >
> > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@xxxxxxxxxx>
> > Tested-by: Christopher Obbard <christopher.obbard@xxxxxxxxxx>
>
> > @@ -82,6 +83,10 @@ static int mux_gpio_probe(struct platform_device *pdev)
> > mux_chip->mux->idle_state = idle_state;
> > }
> >
> > + ret = devm_regulator_get_enable_optional(dev, "mux");
> > + if (ret && ret != -ENODEV)
> > + return dev_err_probe(dev, ret, "Couldn't retrieve/enable gpio mux supply\n");
>
> nit: "failed to get/enable mux supply" may be more consistent with the
> other (non-capitalised error) messages and avoids repeating "gpio mux"
> which will be added by driver core.
>
> > +
> > ret = devm_mux_chip_register(dev, mux_chip);
> > if (ret < 0)
> > return ret;
>
> Either way:
>
> Reviewed-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
> Tested-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
Can someone please pick this one and the binding update up for 6.16?
I see you recently volunteered to do so, Krzysztof? [1]
Johan
[1] https://lore.kernel.org/all/20250501175303.144102-2-krzysztof.kozlowski@xxxxxxxxxx/