ARM: tegra: paz00: enable rfkill for internal wifi card
authorMarc Dietrich <marvin24@gmx.de>
Sun, 7 Aug 2011 19:00:52 +0000 (21:00 +0200)
committerOlof Johansson <olof@lixom.net>
Tue, 9 Aug 2011 19:07:40 +0000 (12:07 -0700)
This patch adds support for controlling the rfkill gpios for the
internal WIFI card via the rfkill_gpio driver.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mach-tegra/board-paz00-pinmux.c
arch/arm/mach-tegra/board-paz00.c
arch/arm/mach-tegra/board-paz00.h

index bdd2627dd87ba0acdde5eb29b254274808f09499..70c57101b0b28298e87e8e70ba5e065a28518f45 100644 (file)
@@ -145,6 +145,8 @@ static struct tegra_gpio_table gpio_table[] = {
        { .gpio = TEGRA_GPIO_SD1_WP,    .enable = true },
        { .gpio = TEGRA_GPIO_SD1_POWER, .enable = true },
        { .gpio = TEGRA_ULPI_RST,       .enable = true },
+       { .gpio = TEGRA_WIFI_PWRN,      .enable = true },
+       { .gpio = TEGRA_WIFI_RST,       .enable = true },
 };
 
 void paz00_pinmux_init(void)
index f3b737637306eb9587d11e7403c1aff347591539..6b798e7609314f17644f0cb90c228c991e684567 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/pda_power.h>
 #include <linux/io.h>
 #include <linux/i2c.h>
+#include <linux/rfkill-gpio.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -75,10 +76,26 @@ static struct platform_device debug_uart = {
        },
 };
 
+static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
+       .name           = "wifi_rfkill",
+       .reset_gpio     = TEGRA_WIFI_RST,
+       .shutdown_gpio  = TEGRA_WIFI_PWRN,
+       .type   = RFKILL_TYPE_WLAN,
+};
+
+static struct platform_device wifi_rfkill_device = {
+       .name   = "rfkill_gpio",
+       .id     = -1,
+       .dev    = {
+               .platform_data = &wifi_rfkill_platform_data,
+       },
+};
+
 static struct platform_device *paz00_devices[] __initdata = {
        &debug_uart,
        &tegra_sdhci_device1,
        &tegra_sdhci_device4,
+       &wifi_rfkill_device,
 };
 
 static void paz00_i2c_init(void)
index d4ff39ddaeb3e4fffbbdf62e2183e68a2013f9de..e780f30fcf12bc961fd0a3c4697eb6745dbf1cfa 100644 (file)
 #ifndef _MACH_TEGRA_BOARD_PAZ00_H
 #define _MACH_TEGRA_BOARD_PAZ00_H
 
-#define TEGRA_GPIO_SD1_CD              TEGRA_GPIO_PV5
-#define TEGRA_GPIO_SD1_WP              TEGRA_GPIO_PH1
-#define TEGRA_GPIO_SD1_POWER           TEGRA_GPIO_PT3
-#define TEGRA_ULPI_RST                 TEGRA_GPIO_PV0
+/* SDCARD */
+#define TEGRA_GPIO_SD1_CD      TEGRA_GPIO_PV5
+#define TEGRA_GPIO_SD1_WP      TEGRA_GPIO_PH1
+#define TEGRA_GPIO_SD1_POWER   TEGRA_GPIO_PT3
+
+/* ULPI */
+#define TEGRA_ULPI_RST         TEGRA_GPIO_PV0
+
+/* WIFI */
+#define TEGRA_WIFI_PWRN                TEGRA_GPIO_PK5
+#define TEGRA_WIFI_RST         TEGRA_GPIO_PD1
 
 void paz00_pinmux_init(void);
 
This page took 0.026652 seconds and 5 git commands to generate.