From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heikki Krogerus Subject: [PATCHv4] ARM: tegra: add gpiod_lookup table for paz00 Date: Tue, 3 Dec 2013 14:49:58 +0200 Message-ID: <1386074998-17833-1-git-send-email-heikki.krogerus@linux.intel.com> References: <1385460350-17543-2-git-send-email-mika.westerberg@linux.intel.com> Return-path: Received: from mga11.intel.com ([192.55.52.93]:10686 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752098Ab3LCMuE (ORCPT ); Tue, 3 Dec 2013 07:50:04 -0500 In-Reply-To: <1385460350-17543-2-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Mika Westerberg , Linus Walleij Cc: "Rafael J. Wysocki" , Chris Ball , Johannes Berg , Rhyland Klein , Adrian Hunter , Alexandre Courbot , Mathias Nyman , Rob Landley , Stephen Warren , Thierry Reding , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org This makes it possible to request the gpio descriptors in rfkill_gpio driver regardless of the platform. Signed-off-by: Heikki Krogerus --- arch/arm/mach-tegra/board-paz00.c | 11 +++++++++++ 1 file changed, 11 insertions(+) Changes since v3: ----------------- Rebased on top of Alexandre's patch "gpio: better lookup method for platform GPIOs". diff --git a/arch/arm/mach-tegra/board-paz00.c b/arch/arm/mach-tegra/board-paz00.c index 06f0240..e4dec9f 100644 --- a/arch/arm/mach-tegra/board-paz00.c +++ b/arch/arm/mach-tegra/board-paz00.c @@ -18,6 +18,7 @@ */ #include +#include #include #include "board.h" @@ -36,7 +37,17 @@ static struct platform_device wifi_rfkill_device = { }, }; +static struct gpiod_lookup_table wifi_gpio_lookup = { + .dev_id = "rfkill_gpio", + .table = { + GPIO_LOOKUP_IDX("tegra-gpio", 25, NULL, 0, 0), + GPIO_LOOKUP_IDX("tegra-gpio", 85, NULL, 1, 0), + { }, + }, +}; + void __init tegra_paz00_wifikill_init(void) { + gpiod_add_lookup_table(&wifi_gpio_lookup); platform_device_register(&wifi_rfkill_device); } -- 1.8.4.4