From patchwork Sun Aug 7 19:00:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Dietrich X-Patchwork-Id: 1042672 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p77J1g9t008300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 7 Aug 2011 19:02:04 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qq8bL-0000sr-2m; Sun, 07 Aug 2011 19:01:31 +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 1Qq8bK-00073J-EB; Sun, 07 Aug 2011 19:01:30 +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 1Qq8ay-0006yv-Mv for linux-arm-kernel@lists.infradead.org; Sun, 07 Aug 2011 19:01:09 +0000 Received: (qmail invoked by alias); 07 Aug 2011 19:01:06 -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:06 +0200 X-Authenticated: #9962044 X-Provags-ID: V01U2FsdGVkX1/UbLBn+erU/Byi7XQR8vBqUv4yqDVn9X8UScCE4v uhkG45b7LFsQr0 From: Marc Dietrich To: Colin Cross Subject: [PATCH 2/5] ARM: tegra: paz00: enable rfkill for internal wifi card Date: Sun, 7 Aug 2011 21:00:52 +0200 Message-Id: <089ce540da0a4545b86c52e5247fbbceb65edcb1.1312742856.git.marvin24@gmx.de> 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_051802_FE644B5B X-CRM114-Status: GOOD ( 14.42 ) 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 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) -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] 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 (demeter1.kernel.org [140.211.167.41]); Sun, 07 Aug 2011 19:02:04 +0000 (UTC) This patch adds support for controlling the rfkill gpios for the internal WIFI card via the rfkill_gpio driver. Signed-off-by: Marc Dietrich --- arch/arm/mach-tegra/board-paz00-pinmux.c | 2 ++ arch/arm/mach-tegra/board-paz00.c | 17 +++++++++++++++++ arch/arm/mach-tegra/board-paz00.h | 15 +++++++++++---- 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 bdd2627..70c5710 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[] = { { .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) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index f3b7376..6b798e7 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -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) diff --git a/arch/arm/mach-tegra/board-paz00.h b/arch/arm/mach-tegra/board-paz00.h index d4ff39d..e780f30 100644 --- a/arch/arm/mach-tegra/board-paz00.h +++ b/arch/arm/mach-tegra/board-paz00.h @@ -17,10 +17,17 @@ #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);