Skip to contentSkip to conversation

ARM: tegra: paz00: configure WiFi rfkill switch through device tree

PATCH Applied Dmitry Torokhov 3 participants 3 messages Mar 25 – Mar 27

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: tegra: paz00: configure WiFi rfkill switch through device tree

As of d64c732dfc9e ("net: rfkill: gpio: add DT support") rfkill-gpio device can be instantiated via device tree.

Add the declaration there and drop board-paz00.c file and relevant Makefile fragments.

---

V2:
- added Marc's Tested-by

V1:
- https://lore.kernel.org/r/[email protected]

 arch/arm/boot/dts/nvidia/tegra20-paz00.dts |  8 ++++
 arch/arm/mach-tegra/Makefile               |  2 -
 arch/arm/mach-tegra/board-paz00.c          | 56 ----------------------
 arch/arm/mach-tegra/board.h                |  2 -
 arch/arm/mach-tegra/tegra.c                |  4 --
 5 files changed, 8 insertions(+), 64 deletions(-)
arch/arm/boot/dts/nvidia/tegra20-paz00.dts +8 -0
index 1408e1e00759..d1093ad569e6 100644
@@ -706,6 +706,14 @@ vdd_pnl_reg: regulator-3v0 {
 		enable-active-high;
 	};
 
+	rfkill {
+		compatible = "rfkill-gpio";
+		label = "wifi_rfkill";
+		radio-type = "wlan";
+		reset-gpios = <&gpio TEGRA_GPIO(D, 1) GPIO_ACTIVE_HIGH>;
+		shutdown-gpios = <&gpio TEGRA_GPIO(K, 5) GPIO_ACTIVE_HIGH>;
+	};
+
 	sound {
 		compatible = "nvidia,tegra-audio-alc5632-paz00",
 			"nvidia,tegra-audio-alc5632";
arch/arm/mach-tegra/Makefile +0 -2
index a2bb55bc0081..9e3abb14fbc1 100644
@@ -15,5 +15,3 @@ obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)	+= pm-tegra30.o
 obj-$(CONFIG_ARCH_TEGRA_124_SOC)	+= pm-tegra30.o
-
-obj-$(CONFIG_ARCH_TEGRA_2x_SOC)		+= board-paz00.o
arch/arm/mach-tegra/board-paz00.c deleted +0 -56

56 lines not on this page · raw message

arch/arm/mach-tegra/board.h +0 -2
index 7b3ef0dc9be1..86c3ea0d6b30 100644
@@ -19,6 +19,4 @@
 void __init tegra_map_common_io(void);
 void __init tegra_init_irq(void);
 
-void __init tegra_paz00_wifikill_init(void);
-
 #endif
arch/arm/mach-tegra/tegra.c +0 -4
index 9ef1dfa7b926..f324a7e491d8 100644
@@ -83,10 +83,6 @@ static void __init tegra_dt_init(void)
 
 static void __init tegra_dt_init_late(void)
 {
-	if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) &&
-	    of_machine_is_compatible("compal,paz00"))
-		tegra_paz00_wifikill_init();
-
 	if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) &&
 	    of_machine_is_compatible("nvidia,tegra20"))
 		platform_device_register_simple("tegra20-cpufreq", -1, NULL, 0);
Signature · 5 lines
2.53.0.1018.g2bb0e51243-goog


-- 
Dmitry
Reviewed-by on v2 1/1
#1 lore raw
Quoted 9 lines · Dmitry Torokhov

As of d64c732dfc9e ("net: rfkill: gpio: add DT support") rfkill-gpio device can be instantiated via device tree.

Add the declaration there and drop board-paz00.c file and relevant Makefile fragments.

---

But now I need to find another victim of my auto secondary fwnode experiments for OF systems. :)

maintainer Applied
#2 lore raw
In reply to Dmitry Torokhov
Quoted 16 lines · Dmitry Torokhov

As of d64c732dfc9e ("net: rfkill: gpio: add DT support") rfkill-gpio device can be instantiated via device tree.

Add the declaration there and drop board-paz00.c file and relevant Makefile fragments.

---

V2:
- added Marc's Tested-by

V1:
- https://lore.kernel.org/r/[email protected]

Quoted 6 lines
 arch/arm/boot/dts/nvidia/tegra20-paz00.dts |  8 ++++
 arch/arm/mach-tegra/Makefile               |  2 -
 arch/arm/mach-tegra/board-paz00.c          | 56 ----------------------
 arch/arm/mach-tegra/board.h                |  2 -
 arch/arm/mach-tegra/tegra.c                |  4 --
 5 files changed, 8 insertions(+), 64 deletions(-)

Applied, thanks.

Thierry