[PATCH] Fix WCD938x polarity

From: Linus Walleij
Date: Mon Mar 24 2025 - 03:44:45 EST


Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
---
drivers/gpio/gpiolib-of.c | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 2e537ee979f3..3baaddedb7b6 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -220,6 +220,15 @@ static void of_gpio_try_fixup_polarity(const
struct device_node *np,
* treats it as "active low".
*/
{ "ti,tsc2005", "reset-gpios", false },
+#endif
+#if IS_ENABLED(SND_SOC_WCD938X)
+ /*
+ * This codec is used in laptops with deployed devicetrees
+ * that fail to specify the correct active low property for
+ * the reset line.
+ */
+ { "qcom,wcd9380-codec", "reset-gpios", false },
+ { "qcom,wcd9385-codec", "reset-gpios", false },
#endif
};
unsigned int i;
--=20
2.48.1

Maybe you can fold this into your patch if it helps. And if there are more
of the codecs with this problem, we need a similar patch in each one
of them.

Yours,
Linus Walleij