* [PATCH v2 1/3] ASoC: codec: wcd939x: Convert to GPIO descriptors
2025-03-24 11:51 [PATCH v2 0/3] ASoC: codec: wcd93xx: Convert to GPIO descriptors Peng Fan (OSS)
@ 2025-03-24 11:51 ` Peng Fan (OSS)
2025-03-27 8:50 ` Bartosz Golaszewski
2025-03-24 11:51 ` [PATCH v2 2/3] ASoC: codec: wcd938x: " Peng Fan (OSS)
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Peng Fan (OSS) @ 2025-03-24 11:51 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Bartosz Golaszewski, Srinivas Kandagatla,
Steev Klimaszewski, Johan Hovold
Cc: linux-sound, linux-kernel, linux-gpio, linux-arm-msm, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
of_gpio.h is deprecated, update the driver to use GPIO descriptors.
- Use dev_gpiod_get to get GPIO descriptor.
- Use gpiod_set_value to configure output value.
With legacy of_gpio API, the driver set gpio value 0 to assert reset,
and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
output low, set value 0 means output high with gpiod API.
The in-tree DTS files have the right polarity set up already so we
can expect this to "just work".
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
sound/soc/codecs/wcd939x.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/wcd939x.c b/sound/soc/codecs/wcd939x.c
index 0a87a79772da6c0ed3c7dd7d098e949b9cead2a4..837c86ceb1097254f4029087ce401c5a8645bf21 100644
--- a/sound/soc/codecs/wcd939x.c
+++ b/sound/soc/codecs/wcd939x.c
@@ -15,7 +15,6 @@
#include <linux/pm_runtime.h>
#include <linux/component.h>
#include <sound/tlv.h>
-#include <linux/of_gpio.h>
#include <linux/of_graph.h>
#include <linux/of.h>
#include <sound/jack.h>
@@ -201,7 +200,7 @@ struct wcd939x_priv {
u32 hph_mode;
u32 tx_mode[TX_ADC_MAX];
int variant;
- int reset_gpio;
+ struct gpio_desc *reset_gpio;
u32 micb1_mv;
u32 micb2_mv;
u32 micb3_mv;
@@ -3239,10 +3238,11 @@ static int wcd939x_populate_dt_data(struct wcd939x_priv *wcd939x, struct device
#endif /* CONFIG_TYPEC */
int ret;
- wcd939x->reset_gpio = of_get_named_gpio(dev->of_node, "reset-gpios", 0);
- if (wcd939x->reset_gpio < 0)
- return dev_err_probe(dev, wcd939x->reset_gpio,
- "Failed to get reset gpio\n");
+ wcd939x->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(wcd939x->reset_gpio)) {
+ ret = PTR_ERR(wcd939x->reset_gpio);
+ return dev_err_probe(dev, ret, "Failed to get reset gpio\n");
+ }
wcd939x->supplies[0].supply = "vdd-rxtx";
wcd939x->supplies[1].supply = "vdd-io";
@@ -3290,10 +3290,10 @@ static int wcd939x_populate_dt_data(struct wcd939x_priv *wcd939x, struct device
static int wcd939x_reset(struct wcd939x_priv *wcd939x)
{
- gpio_direction_output(wcd939x->reset_gpio, 0);
+ gpiod_set_value(wcd939x->reset_gpio, 1);
/* 20us sleep required after pulling the reset gpio to LOW */
usleep_range(20, 30);
- gpio_set_value(wcd939x->reset_gpio, 1);
+ gpiod_set_value(wcd939x->reset_gpio, 0);
/* 20us sleep required after pulling the reset gpio to HIGH */
usleep_range(20, 30);
--
2.37.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 1/3] ASoC: codec: wcd939x: Convert to GPIO descriptors
2025-03-24 11:51 ` [PATCH v2 1/3] ASoC: codec: wcd939x: " Peng Fan (OSS)
@ 2025-03-27 8:50 ` Bartosz Golaszewski
0 siblings, 0 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2025-03-27 8:50 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Srinivas Kandagatla, Steev Klimaszewski,
Johan Hovold, linux-sound, linux-kernel, linux-gpio,
linux-arm-msm, Peng Fan
On Mon, Mar 24, 2025 at 12:52 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
> - Use dev_gpiod_get to get GPIO descriptor.
> - Use gpiod_set_value to configure output value.
>
> With legacy of_gpio API, the driver set gpio value 0 to assert reset,
> and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
> DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
> output low, set value 0 means output high with gpiod API.
>
> The in-tree DTS files have the right polarity set up already so we
> can expect this to "just work".
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 2/3] ASoC: codec: wcd938x: Convert to GPIO descriptors
2025-03-24 11:51 [PATCH v2 0/3] ASoC: codec: wcd93xx: Convert to GPIO descriptors Peng Fan (OSS)
2025-03-24 11:51 ` [PATCH v2 1/3] ASoC: codec: wcd939x: " Peng Fan (OSS)
@ 2025-03-24 11:51 ` Peng Fan (OSS)
2025-03-24 15:38 ` Steev Klimaszewski
2025-03-27 8:50 ` Bartosz Golaszewski
2025-03-24 11:51 ` [PATCH v2 3/3] ASoC: codec: wcd9335: " Peng Fan (OSS)
2025-04-08 12:48 ` [PATCH v2 0/3] ASoC: codec: wcd93xx: " Mark Brown
3 siblings, 2 replies; 10+ messages in thread
From: Peng Fan (OSS) @ 2025-03-24 11:51 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Bartosz Golaszewski, Srinivas Kandagatla,
Steev Klimaszewski, Johan Hovold
Cc: linux-sound, linux-kernel, linux-gpio, linux-arm-msm, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
of_gpio.h is deprecated, update the driver to use GPIO descriptors.
- Use dev_gpiod_get to get GPIO descriptor.
- Use gpiod_set_value to configure output value.
With legacy of_gpio API, the driver set gpio value 0 to assert reset,
and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
output low, set value 0 means output high with gpiod API.
The in-tree DTS files have the right polarity set up already so we
can expect this to "just work".
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
sound/soc/codecs/wcd938x.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 1ae498c323912ed799dcc033e7777936d90c9284..955a0d3a77d7cb45932faa0c7a6f5060232d33b4 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -11,7 +11,6 @@
#include <linux/pm_runtime.h>
#include <linux/component.h>
#include <sound/tlv.h>
-#include <linux/of_gpio.h>
#include <linux/of.h>
#include <sound/jack.h>
#include <sound/pcm.h>
@@ -171,7 +170,7 @@ struct wcd938x_priv {
int flyback_cur_det_disable;
int ear_rx_path;
int variant;
- int reset_gpio;
+ struct gpio_desc *reset_gpio;
struct gpio_desc *us_euro_gpio;
u32 micb1_mv;
u32 micb2_mv;
@@ -3251,9 +3250,9 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
struct wcd_mbhc_config *cfg = &wcd938x->mbhc_cfg;
int ret;
- wcd938x->reset_gpio = of_get_named_gpio(dev->of_node, "reset-gpios", 0);
- if (wcd938x->reset_gpio < 0)
- return dev_err_probe(dev, wcd938x->reset_gpio,
+ wcd938x->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(wcd938x->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(wcd938x->reset_gpio),
"Failed to get reset gpio\n");
wcd938x->us_euro_gpio = devm_gpiod_get_optional(dev, "us-euro",
@@ -3297,10 +3296,10 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
static int wcd938x_reset(struct wcd938x_priv *wcd938x)
{
- gpio_direction_output(wcd938x->reset_gpio, 0);
+ gpiod_set_value(wcd938x->reset_gpio, 1);
/* 20us sleep required after pulling the reset gpio to LOW */
usleep_range(20, 30);
- gpio_set_value(wcd938x->reset_gpio, 1);
+ gpiod_set_value(wcd938x->reset_gpio, 0);
/* 20us sleep required after pulling the reset gpio to HIGH */
usleep_range(20, 30);
--
2.37.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 2/3] ASoC: codec: wcd938x: Convert to GPIO descriptors
2025-03-24 11:51 ` [PATCH v2 2/3] ASoC: codec: wcd938x: " Peng Fan (OSS)
@ 2025-03-24 15:38 ` Steev Klimaszewski
2025-03-25 0:35 ` Peng Fan
2025-03-27 8:50 ` Bartosz Golaszewski
1 sibling, 1 reply; 10+ messages in thread
From: Steev Klimaszewski @ 2025-03-24 15:38 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Bartosz Golaszewski, Srinivas Kandagatla,
Johan Hovold, linux-sound, linux-kernel, linux-gpio,
linux-arm-msm, Peng Fan
Hi Peng,
On Mon, Mar 24, 2025 at 6:52 AM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
> - Use dev_gpiod_get to get GPIO descriptor.
> - Use gpiod_set_value to configure output value.
>
> With legacy of_gpio API, the driver set gpio value 0 to assert reset,
> and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
> DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
> output low, set value 0 means output high with gpiod API.
>
> The in-tree DTS files have the right polarity set up already so we
> can expect this to "just work".
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> sound/soc/codecs/wcd938x.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
> index 1ae498c323912ed799dcc033e7777936d90c9284..955a0d3a77d7cb45932faa0c7a6f5060232d33b4 100644
> --- a/sound/soc/codecs/wcd938x.c
> +++ b/sound/soc/codecs/wcd938x.c
> @@ -11,7 +11,6 @@
> #include <linux/pm_runtime.h>
> #include <linux/component.h>
> #include <sound/tlv.h>
> -#include <linux/of_gpio.h>
> #include <linux/of.h>
> #include <sound/jack.h>
> #include <sound/pcm.h>
> @@ -171,7 +170,7 @@ struct wcd938x_priv {
> int flyback_cur_det_disable;
> int ear_rx_path;
> int variant;
> - int reset_gpio;
> + struct gpio_desc *reset_gpio;
> struct gpio_desc *us_euro_gpio;
> u32 micb1_mv;
> u32 micb2_mv;
> @@ -3251,9 +3250,9 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
> struct wcd_mbhc_config *cfg = &wcd938x->mbhc_cfg;
> int ret;
>
> - wcd938x->reset_gpio = of_get_named_gpio(dev->of_node, "reset-gpios", 0);
> - if (wcd938x->reset_gpio < 0)
> - return dev_err_probe(dev, wcd938x->reset_gpio,
> + wcd938x->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
> + if (IS_ERR(wcd938x->reset_gpio))
> + return dev_err_probe(dev, PTR_ERR(wcd938x->reset_gpio),
> "Failed to get reset gpio\n");
>
> wcd938x->us_euro_gpio = devm_gpiod_get_optional(dev, "us-euro",
> @@ -3297,10 +3296,10 @@ static int wcd938x_populate_dt_data(struct wcd938x_priv *wcd938x, struct device
>
> static int wcd938x_reset(struct wcd938x_priv *wcd938x)
> {
> - gpio_direction_output(wcd938x->reset_gpio, 0);
> + gpiod_set_value(wcd938x->reset_gpio, 1);
> /* 20us sleep required after pulling the reset gpio to LOW */
> usleep_range(20, 30);
> - gpio_set_value(wcd938x->reset_gpio, 1);
> + gpiod_set_value(wcd938x->reset_gpio, 0);
> /* 20us sleep required after pulling the reset gpio to HIGH */
> usleep_range(20, 30);
>
>
> --
> 2.37.1
>
I can verify that with v2 applied, I do still have working audio on
the Thinkpad X13s. Apologies for not replying earlier, it was
unfortunately my night time. For the record though, I do not use the
firmware dtb files, but explicitly list the kernel that I am using
and/or testing to be used on each boot.
Tested-by: Steev Klimaszewski <steev@kali.org>
Thanks!
-- steev
^ permalink raw reply [flat|nested] 10+ messages in thread* RE: [PATCH v2 2/3] ASoC: codec: wcd938x: Convert to GPIO descriptors
2025-03-24 15:38 ` Steev Klimaszewski
@ 2025-03-25 0:35 ` Peng Fan
0 siblings, 0 replies; 10+ messages in thread
From: Peng Fan @ 2025-03-25 0:35 UTC (permalink / raw)
To: Steev Klimaszewski
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Bartosz Golaszewski, Srinivas Kandagatla,
Johan Hovold, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
linux-arm-msm@vger.kernel.org
> Subject: Re: [PATCH v2 2/3] ASoC: codec: wcd938x: Convert to GPIO
> descriptors
>
...
> >
> I can verify that with v2 applied, I do still have working audio on the
> Thinkpad X13s. Apologies for not replying earlier, it was unfortunately
> my night time. For the record though, I do not use the firmware dtb
> files, but explicitly list the kernel that I am using and/or testing to be
> used on each boot.
>
> Tested-by: Steev Klimaszewski <steev@kali.org>
Appreciate for helping test.
Thanks,
Peng.
>
> Thanks!
> -- steev
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/3] ASoC: codec: wcd938x: Convert to GPIO descriptors
2025-03-24 11:51 ` [PATCH v2 2/3] ASoC: codec: wcd938x: " Peng Fan (OSS)
2025-03-24 15:38 ` Steev Klimaszewski
@ 2025-03-27 8:50 ` Bartosz Golaszewski
1 sibling, 0 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2025-03-27 8:50 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Srinivas Kandagatla, Steev Klimaszewski,
Johan Hovold, linux-sound, linux-kernel, linux-gpio,
linux-arm-msm, Peng Fan
On Mon, Mar 24, 2025 at 12:52 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
> - Use dev_gpiod_get to get GPIO descriptor.
> - Use gpiod_set_value to configure output value.
>
> With legacy of_gpio API, the driver set gpio value 0 to assert reset,
> and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
> DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
> output low, set value 0 means output high with gpiod API.
>
> The in-tree DTS files have the right polarity set up already so we
> can expect this to "just work".
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 3/3] ASoC: codec: wcd9335: Convert to GPIO descriptors
2025-03-24 11:51 [PATCH v2 0/3] ASoC: codec: wcd93xx: Convert to GPIO descriptors Peng Fan (OSS)
2025-03-24 11:51 ` [PATCH v2 1/3] ASoC: codec: wcd939x: " Peng Fan (OSS)
2025-03-24 11:51 ` [PATCH v2 2/3] ASoC: codec: wcd938x: " Peng Fan (OSS)
@ 2025-03-24 11:51 ` Peng Fan (OSS)
2025-03-27 8:50 ` Bartosz Golaszewski
2025-04-08 12:48 ` [PATCH v2 0/3] ASoC: codec: wcd93xx: " Mark Brown
3 siblings, 1 reply; 10+ messages in thread
From: Peng Fan (OSS) @ 2025-03-24 11:51 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Bartosz Golaszewski, Srinivas Kandagatla,
Steev Klimaszewski, Johan Hovold
Cc: linux-sound, linux-kernel, linux-gpio, linux-arm-msm, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
of_gpio.h is deprecated, update the driver to use GPIO descriptors.
- Use dev_gpiod_get to get GPIO descriptor.
- Use gpiod_set_value to configure output value.
With legacy of_gpio API, the driver set gpio value 0 to assert reset,
and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
output low, set value 0 means output high with gpiod API.
The in-tree DTS files have the right polarity set up already so we can
expect this to "just work"
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
sound/soc/codecs/wcd9335.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c
index 7cef43bb2a8800971604b0e1ac55aac26c5919bd..8ee4360aff9293178e338e3ef300c37f6f2ac809 100644
--- a/sound/soc/codecs/wcd9335.c
+++ b/sound/soc/codecs/wcd9335.c
@@ -17,7 +17,7 @@
#include <sound/soc.h>
#include <sound/pcm_params.h>
#include <sound/soc-dapm.h>
-#include <linux/of_gpio.h>
+#include <linux/gpio/consumer.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <sound/tlv.h>
@@ -331,7 +331,7 @@ struct wcd9335_codec {
int comp_enabled[COMPANDER_MAX];
int intr1;
- int reset_gpio;
+ struct gpio_desc *reset_gpio;
struct regulator_bulk_data supplies[WCD9335_MAX_SUPPLY];
unsigned int rx_port_value[WCD9335_RX_MAX];
@@ -4975,12 +4975,11 @@ static const struct regmap_irq_chip wcd9335_regmap_irq1_chip = {
static int wcd9335_parse_dt(struct wcd9335_codec *wcd)
{
struct device *dev = wcd->dev;
- struct device_node *np = dev->of_node;
int ret;
- wcd->reset_gpio = of_get_named_gpio(np, "reset-gpios", 0);
- if (wcd->reset_gpio < 0)
- return dev_err_probe(dev, wcd->reset_gpio, "Reset GPIO missing from DT\n");
+ wcd->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(wcd->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(wcd->reset_gpio), "Reset GPIO missing from DT\n");
wcd->mclk = devm_clk_get(dev, "mclk");
if (IS_ERR(wcd->mclk))
@@ -5023,9 +5022,9 @@ static int wcd9335_power_on_reset(struct wcd9335_codec *wcd)
*/
usleep_range(600, 650);
- gpio_direction_output(wcd->reset_gpio, 0);
+ gpiod_set_value(wcd->reset_gpio, 1);
msleep(20);
- gpio_set_value(wcd->reset_gpio, 1);
+ gpiod_set_value(wcd->reset_gpio, 0);
msleep(20);
return 0;
--
2.37.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH v2 3/3] ASoC: codec: wcd9335: Convert to GPIO descriptors
2025-03-24 11:51 ` [PATCH v2 3/3] ASoC: codec: wcd9335: " Peng Fan (OSS)
@ 2025-03-27 8:50 ` Bartosz Golaszewski
0 siblings, 0 replies; 10+ messages in thread
From: Bartosz Golaszewski @ 2025-03-27 8:50 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Linus Walleij, Srinivas Kandagatla, Steev Klimaszewski,
Johan Hovold, linux-sound, linux-kernel, linux-gpio,
linux-arm-msm, Peng Fan
On Mon, Mar 24, 2025 at 12:52 PM Peng Fan (OSS) <peng.fan@oss.nxp.com> wrote:
>
> From: Peng Fan <peng.fan@nxp.com>
>
> of_gpio.h is deprecated, update the driver to use GPIO descriptors.
> - Use dev_gpiod_get to get GPIO descriptor.
> - Use gpiod_set_value to configure output value.
>
> With legacy of_gpio API, the driver set gpio value 0 to assert reset,
> and 1 to deassert reset. And the reset-gpios use GPIO_ACTIVE_LOW flag in
> DTS, so set GPIOD_OUT_LOW when get GPIO descriptors, and set value 1 means
> output low, set value 0 means output high with gpiod API.
>
> The in-tree DTS files have the right polarity set up already so we can
> expect this to "just work"
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 0/3] ASoC: codec: wcd93xx: Convert to GPIO descriptors
2025-03-24 11:51 [PATCH v2 0/3] ASoC: codec: wcd93xx: Convert to GPIO descriptors Peng Fan (OSS)
` (2 preceding siblings ...)
2025-03-24 11:51 ` [PATCH v2 3/3] ASoC: codec: wcd9335: " Peng Fan (OSS)
@ 2025-04-08 12:48 ` Mark Brown
3 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2025-04-08 12:48 UTC (permalink / raw)
To: Liam Girdwood, Jaroslav Kysela, Takashi Iwai, Linus Walleij,
Bartosz Golaszewski, Srinivas Kandagatla, Steev Klimaszewski,
Johan Hovold, Peng Fan (OSS)
Cc: linux-sound, linux-kernel, linux-gpio, linux-arm-msm, Peng Fan
On Mon, 24 Mar 2025 19:51:26 +0800, Peng Fan (OSS) wrote:
> Steev,
> I would appreciate if you have time to help test again.
> Hope V2 could work on your platform.
>
> Linus,
> Since v2 is only a minor change to use GPIOD_OUT_LOW to replace
> GPIOD_ASIS when devm_gpio_get, so I still keep you R-b. Appreciate
> for your quick action.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/3] ASoC: codec: wcd939x: Convert to GPIO descriptors
commit: 4bba5d0e51647e06c83036b6c3f0ec65465adc68
[2/3] ASoC: codec: wcd938x: Convert to GPIO descriptors
commit: c2d359b4acfbe847d3edcc25d3dc4e594daf9010
[3/3] ASoC: codec: wcd9335: Convert to GPIO descriptors
commit: d5099bc1b56417733f4cccf10c61ee74dadd5562
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 10+ messages in thread