Message ID | 20250327100633.11530-3-srinivas.kandagatla@linaro.org |
---|---|
State | New |
Headers | show |
Series | ASoC: wcd938x: enable t14s audio headset | expand |
On Thu, Mar 27, 2025 at 10:06:29AM +0000, srinivas.kandagatla@linaro.org wrote: > From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> > > 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. The ASoC bits of this series look fine, what's the plan with the mux bits? It looks like the two parts can just get merged independently.
On 01/04/2025 11:16, Mark Brown wrote: > On Thu, Mar 27, 2025 at 10:06:29AM +0000, srinivas.kandagatla@linaro.org wrote: >> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> >> >> 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. > > The ASoC bits of this series look fine, what's the plan with the mux > bits? It looks like the two parts can just get merged independently. ASoC bits and codec bindings can go independently, there is no compile time dependency. --srini
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@linaro.org> > > > > 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@linaro.org> > > Tested-by: Christopher Obbard <christopher.obbard@linaro.org> > > > @@ -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@kernel.org> > Tested-by: Johan Hovold <johan+linaro@kernel.org> 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@linaro.org/
On 08/05/2025 14:45, Johan Hovold wrote: >> 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@kernel.org> >> Tested-by: Johan Hovold <johan+linaro@kernel.org> > > Can someone please pick this one and the binding update up for 6.16? > > I see you recently volunteered to do so, Krzysztof? [1] Sure, thanks for ping. I'll take with your change in err msg. > > Johan > > [1] https://lore.kernel.org/all/20250501175303.144102-2-krzysztof.kozlowski@linaro.org/ Best regards, Krzysztof
diff --git a/drivers/mux/gpio.c b/drivers/mux/gpio.c index cc5f2c1861d4..d1607f287755 100644 --- a/drivers/mux/gpio.c +++ b/drivers/mux/gpio.c @@ -15,6 +15,7 @@ #include <linux/mux/driver.h> #include <linux/platform_device.h> #include <linux/property.h> +#include <linux/regulator/consumer.h> struct mux_gpio { struct gpio_descs *gpios; @@ -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"); + ret = devm_mux_chip_register(dev, mux_chip); if (ret < 0) return ret;