aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorMarc Dietrich <marvin24@gmx.de>2011-08-07 15:00:52 -0400
committerOlof Johansson <olof@lixom.net>2011-08-09 15:07:40 -0400
commit9aaa15a739a0a3880922a850573493daa4ee4bcc (patch)
treeed6fdef760d5fa0e899975cb978cd58d4a091b40 /arch/arm/mach-tegra
parentde7164db70af94e58dca84426374138cd3a18f34 (diff)
ARM: tegra: paz00: enable rfkill for internal wifi card
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>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-paz00-pinmux.c2
-rw-r--r--arch/arm/mach-tegra/board-paz00.c17
-rw-r--r--arch/arm/mach-tegra/board-paz00.h15
3 files changed, 30 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c
index bdd2627dd87b..70c57101b0b2 100644
--- a/arch/arm/mach-tegra/board-paz00-pinmux.c
+++ b/arch/arm/mach-tegra/board-paz00-pinmux.c
@@ -145,6 +145,8 @@ static struct tegra_gpio_table gpio_table[] = {
145 { .gpio = TEGRA_GPIO_SD1_WP, .enable = true }, 145 { .gpio = TEGRA_GPIO_SD1_WP, .enable = true },
146 { .gpio = TEGRA_GPIO_SD1_POWER, .enable = true }, 146 { .gpio = TEGRA_GPIO_SD1_POWER, .enable = true },
147 { .gpio = TEGRA_ULPI_RST, .enable = true }, 147 { .gpio = TEGRA_ULPI_RST, .enable = true },
148 { .gpio = TEGRA_WIFI_PWRN, .enable = true },
149 { .gpio = TEGRA_WIFI_RST, .enable = true },
148}; 150};
149 151
150void paz00_pinmux_init(void) 152void paz00_pinmux_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c
index f3b737637306..6b798e760931 100644
--- a/arch/arm/mach-tegra/board-paz00.c
+++ b/arch/arm/mach-tegra/board-paz00.c
@@ -26,6 +26,7 @@
26#include <linux/pda_power.h> 26#include <linux/pda_power.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/i2c.h> 28#include <linux/i2c.h>
29#include <linux/rfkill-gpio.h>
29 30
30#include <asm/mach-types.h> 31#include <asm/mach-types.h>
31#include <asm/mach/arch.h> 32#include <asm/mach/arch.h>
@@ -75,10 +76,26 @@ static struct platform_device debug_uart = {
75 }, 76 },
76}; 77};
77 78
79static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = {
80 .name = "wifi_rfkill",
81 .reset_gpio = TEGRA_WIFI_RST,
82 .shutdown_gpio = TEGRA_WIFI_PWRN,
83 .type = RFKILL_TYPE_WLAN,
84};
85
86static struct platform_device wifi_rfkill_device = {
87 .name = "rfkill_gpio",
88 .id = -1,
89 .dev = {
90 .platform_data = &wifi_rfkill_platform_data,
91 },
92};
93
78static struct platform_device *paz00_devices[] __initdata = { 94static struct platform_device *paz00_devices[] __initdata = {
79 &debug_uart, 95 &debug_uart,
80 &tegra_sdhci_device1, 96 &tegra_sdhci_device1,
81 &tegra_sdhci_device4, 97 &tegra_sdhci_device4,
98 &wifi_rfkill_device,
82}; 99};
83 100
84static void paz00_i2c_init(void) 101static void paz00_i2c_init(void)
diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h
index d4ff39ddaeb3..e780f30fcf12 100644
--- a/arch/arm/mach-tegra/board-paz00.h
+++ b/arch/arm/mach-tegra/board-paz00.h
@@ -17,10 +17,17 @@
17#ifndef _MACH_TEGRA_BOARD_PAZ00_H 17#ifndef _MACH_TEGRA_BOARD_PAZ00_H
18#define _MACH_TEGRA_BOARD_PAZ00_H 18#define _MACH_TEGRA_BOARD_PAZ00_H
19 19
20#define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5 20/* SDCARD */
21#define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1 21#define TEGRA_GPIO_SD1_CD TEGRA_GPIO_PV5
22#define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3 22#define TEGRA_GPIO_SD1_WP TEGRA_GPIO_PH1
23#define TEGRA_ULPI_RST TEGRA_GPIO_PV0 23#define TEGRA_GPIO_SD1_POWER TEGRA_GPIO_PT3
24
25/* ULPI */
26#define TEGRA_ULPI_RST TEGRA_GPIO_PV0
27
28/* WIFI */
29#define TEGRA_WIFI_PWRN TEGRA_GPIO_PK5
30#define TEGRA_WIFI_RST TEGRA_GPIO_PD1
24 31
25void paz00_pinmux_init(void); 32void paz00_pinmux_init(void);
26 33