summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Walleij <linusw@kernel.org>2026-04-27 10:43:21 +0200
committerMark Brown <broonie@kernel.org>2026-04-28 07:39:15 +0900
commitbfa336cee3324f991e93e9e570e8b827273df97e (patch)
treee54c9c50728cd36b1d8121c15cdd6cd19c20a787 /drivers
parent254f49634ee16a731174d2ae34bc50bd5f45e731 (diff)
downloadlinux-bfa336cee3324f991e93e9e570e8b827273df97e.tar.gz
linux-bfa336cee3324f991e93e9e570e8b827273df97e.zip
ASoC: wsa881x: Move custom workaround to gpiolib-of
The WSA881x codec driver has a local workaround for old device trees that have the "powerdown" GPIO flagged as active high, despite it is active low. This quirk can be replaced by a single quirk entry in gpiolib-of.c Drop all polarity inversion code and drop the surplus gpiod_direction_output() call in probe() since we now set up the line correctly when getting the GPIO. Also drop the inclusion of the unused <linux/gpio.h>. Signed-off-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/20260427-asoc-wsa881x-v2-1-9ef965f94624@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpio/gpiolib-of.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 2c923d17541f..90f6295ab338 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -241,6 +241,14 @@ static void of_gpio_try_fixup_polarity(const struct device_node *np,
*/
{ "ti,tsc2005", "reset-gpios", false },
#endif
+#if IS_ENABLED(CONFIG_SND_SOC_WSA881X)
+ /*
+ * WSA881 powerdown is always active low, but some device trees
+ * missed this when first contributed. It also has a very strange
+ * compatible.
+ */
+ { "sdw10217201000", "powerdown-gpios", false },
+#endif
};
unsigned int i;