ARM: tegra: wm8903: Fix polarity of headphones-detection GPIO in device-trees
authorDmitry Osipenko <digetx@gmail.com>
Mon, 10 May 2021 20:25:55 +0000 (23:25 +0300)
committerThierry Reding <treding@nvidia.com>
Mon, 31 May 2021 08:56:14 +0000 (10:56 +0200)
All Tegra boards which use WM8903 audio codec are specifying a wrong
polarity for the headphones detection GPIO. The kernel driver hardcodes
the polarity to active-low, which is the correct polarity, so we can fix
the device-trees safely.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
arch/arm/boot/dts/tegra20-acer-a500-picasso.dts
arch/arm/boot/dts/tegra20-harmony.dts
arch/arm/boot/dts/tegra20-medcom-wide.dts
arch/arm/boot/dts/tegra20-plutux.dts
arch/arm/boot/dts/tegra20-seaboard.dts
arch/arm/boot/dts/tegra20-tec.dts
arch/arm/boot/dts/tegra20-ventana.dts
arch/arm/boot/dts/tegra30-cardhu.dtsi

index 883b76f..1976c38 100644 (file)
                nvidia,audio-codec = <&wm8903>;
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
-               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
+               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
                nvidia,int-mic-en-gpios = <&wm8903 1 GPIO_ACTIVE_HIGH>;
                nvidia,headset;
 
index 86494cb..ae4312e 100644 (file)
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
                nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
-                       GPIO_ACTIVE_HIGH>;
+                       GPIO_ACTIVE_LOW>;
                nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(X, 0)
                        GPIO_ACTIVE_HIGH>;
                nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1)
index a348ca3..b31c9bc 100644 (file)
@@ -84,7 +84,7 @@
                nvidia,audio-codec = <&wm8903>;
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
-               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
+               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
                         <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
index 378f23b..5811b70 100644 (file)
@@ -52,7 +52,7 @@
                nvidia,audio-codec = <&wm8903>;
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
-               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
+               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
                         <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
index c24d4a3..92d494b 100644 (file)
                nvidia,audio-codec = <&wm8903>;
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
-               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_HIGH>;
+               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(X, 1) GPIO_ACTIVE_LOW>;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
                         <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
index 44ced60..10ff09d 100644 (file)
@@ -61,7 +61,7 @@
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
                nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
-                       GPIO_ACTIVE_HIGH>;
+                       GPIO_ACTIVE_LOW>;
 
                clocks = <&tegra_car TEGRA20_CLK_PLL_A>,
                         <&tegra_car TEGRA20_CLK_PLL_A_OUT0>,
index 99a356c..5a2578b 100644 (file)
                nvidia,audio-codec = <&wm8903>;
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
-               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_HIGH>;
+               nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>;
                nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(X, 0)
                        GPIO_ACTIVE_HIGH>;
                nvidia,ext-mic-en-gpios = <&gpio TEGRA_GPIO(X, 1)
index 2dff14b..d9dd115 100644 (file)
 
                nvidia,spkr-en-gpios = <&wm8903 2 GPIO_ACTIVE_HIGH>;
                nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(W, 2)
-                       GPIO_ACTIVE_HIGH>;
+                       GPIO_ACTIVE_LOW>;
 
                clocks = <&tegra_car TEGRA30_CLK_PLL_A>,
                         <&tegra_car TEGRA30_CLK_PLL_A_OUT0>,