From patchwork Sun Aug 7 19:00:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Dietrich X-Patchwork-Id: 1042692 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p77J2d6U005670 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 7 Aug 2011 19:03:00 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qq8c8-0001P1-T4; Sun, 07 Aug 2011 19:02:22 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qq8c6-0007H5-Ct; Sun, 07 Aug 2011 19:02:18 +0000 Received: from mailout-de.gmx.net ([213.165.64.23]) by canuck.infradead.org with smtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qq8az-0006yw-GV for linux-arm-kernel@lists.infradead.org; Sun, 07 Aug 2011 19:01:11 +0000 Received: (qmail invoked by alias); 07 Aug 2011 19:01:07 -0000 Received: from f052027220.adsl.alicedsl.de (EHLO localhost.localdomain) [78.52.27.220] by mail.gmx.net (mp001) with SMTP; 07 Aug 2011 21:01:07 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX19S+SoErqdSfa2RETExEIv6Y11sH/0CcD7xFU+Rw7 pjyZur7UTAOuNM From: Marc Dietrich To: Colin Cross Subject: [PATCH 3/5] ARM: tegra: paz00: enable wifi led Date: Sun, 7 Aug 2011 21:00:53 +0200 Message-Id: X-Mailer: git-send-email 1.7.4.1 In-Reply-To: References: In-Reply-To: References: X-Y-GMX-Trusted: 0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110807_150109_812415_E9BC6BA6 X-CRM114-Status: GOOD ( 13.50 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [213.165.64.23 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (marvin24[at]gmx.de) 0.1 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (marvin24[at]gmx.de) Cc: Olof Johansson , linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marc Dietrich X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sun, 07 Aug 2011 19:03:00 +0000 (UTC) This adds support for the wifi led. It is automaticly triggered by the rfkill0 event. Signed-off-by: Marc Dietrich --- arch/arm/mach-tegra/board-paz00-pinmux.c | 1 + arch/arm/mach-tegra/board-paz00.c | 22 ++++++++++++++++++++++ arch/arm/mach-tegra/board-paz00.h | 1 + 3 files changed, 24 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-tegra/board-paz00-pinmux.c b/arch/arm/mach-tegra/board-paz00-pinmux.c index 70c5710..2225769 100644 --- a/arch/arm/mach-tegra/board-paz00-pinmux.c +++ b/arch/arm/mach-tegra/board-paz00-pinmux.c @@ -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) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 6b798e7..45111f6 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -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) diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index e780f30..86057c3 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h @@ -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);