From: Mika Westerberg Subject: [PATCH v2 2/7] ARM: tegra: add gpiod_lookup table for paz00 Date: Fri, 22 Nov 2013 14:14:29 +0200 Message-ID: <1385122474-14926-3-git-send-email-mika.westerberg@linux.intel.com> References: <1385122474-14926-1-git-send-email-mika.westerberg@linux.intel.com> Return-path: In-Reply-To: <1385122474-14926-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org To: linux-acpi@vger.kernel.org Cc: "Rafael J. Wysocki" , Linus Walleij , Chris Ball , Johannes Berg , Rhyland Klein , Adrian Hunter , Alexandre Courbot , Mathias Nyman , Rob Landley , Heikki Krogerus , Stephen Warren , Thierry Reding , Mika Westerberg , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-acpi@vger.kernel.org From: Heikki Krogerus This makes it possible to request the gpio descriptors in rfkill-gpio driver regardless of the platform. Signed-off-by: Heikki Krogerus Signed-off-by: Mika Westerberg --- arch/arm/mach-tegra/board-paz00.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 06f024070dab..2e132589be78 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -18,13 +18,12 @@ */ #include +#include #include #include "board.h" static struct rfkill_gpio_platform_data wifi_rfkill_platform_data = { .name = "wifi_rfkill", - .reset_gpio = 25, /* PD1 */ - .shutdown_gpio = 85, /* PK5 */ .type = RFKILL_TYPE_WLAN, }; @@ -36,7 +35,13 @@ static struct platform_device wifi_rfkill_device = { }, }; +static struct gpiod_lookup wifi_gpio_lookup[] = { + GPIO_LOOKUP_IDX("tegra-gpio", 25, "rfkill_gpio", NULL, 0, 0), + GPIO_LOOKUP_IDX("tegra-gpio", 85, "rfkill_gpio", NULL, 1, 0), +}; + void __init tegra_paz00_wifikill_init(void) { + gpiod_add_table(wifi_gpio_lookup, ARRAY_SIZE(wifi_gpio_lookup)); platform_device_register(&wifi_rfkill_device); } -- 1.8.4.3