Skip to content

Commit

Permalink
ARM: tegra: paz00: enable wifi led
Browse files Browse the repository at this point in the history
This adds support for the wifi led. It is automaticly triggered by
the rfkill0 event.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Marc Dietrich authored and Olof Johansson committed Aug 9, 2011
1 parent 9aaa15a commit 8e219eb
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/board-paz00-pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ static struct tegra_gpio_table gpio_table[] = {
{ .gpio = TEGRA_ULPI_RST, .enable = true },
{ .gpio = TEGRA_WIFI_PWRN, .enable = true },
{ .gpio = TEGRA_WIFI_RST, .enable = true },
{ .gpio = TEGRA_WIFI_LED, .enable = true },
};

void paz00_pinmux_init(void)
Expand Down
22 changes: 22 additions & 0 deletions arch/arm/mach-tegra/board-paz00.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,33 @@ static struct platform_device wifi_rfkill_device = {
},
};

static struct gpio_led gpio_leds[] = {
{
.name = "wifi-led",
.default_trigger = "rfkill0",
.gpio = TEGRA_WIFI_LED,
},
};

static struct gpio_led_platform_data gpio_led_info = {
.leds = gpio_leds,
.num_leds = ARRAY_SIZE(gpio_leds),
};

static struct platform_device leds_gpio = {
.name = "leds-gpio",
.id = -1,
.dev = {
.platform_data = &gpio_led_info,
},
};

static struct platform_device *paz00_devices[] __initdata = {
&debug_uart,
&tegra_sdhci_device1,
&tegra_sdhci_device4,
&wifi_rfkill_device,
&leds_gpio,
};

static void paz00_i2c_init(void)
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-tegra/board-paz00.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
/* WIFI */
#define TEGRA_WIFI_PWRN TEGRA_GPIO_PK5
#define TEGRA_WIFI_RST TEGRA_GPIO_PD1
#define TEGRA_WIFI_LED TEGRA_GPIO_PD0

void paz00_pinmux_init(void);

Expand Down

0 comments on commit 8e219eb

Please sign in to comment.