]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ARM: tegra: add gpiod_lookup table for paz00
authorHeikki Krogerus <heikki.krogerus@linux.intel.com>
Tue, 3 Dec 2013 12:49:58 +0000 (14:49 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 11 Dec 2013 11:49:29 +0000 (12:49 +0100)
This makes it possible to request the gpio descriptors in
rfkill_gpio driver regardless of the platform.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
arch/arm/mach-tegra/board-paz00.c

index 06f024070dab6ef9a826a2090d068328adeeea50..e4dec9fcb084afe014d8beb09706f946f7b8e734 100644 (file)
@@ -18,6 +18,7 @@
  */
 
 #include <linux/platform_device.h>
+#include <linux/gpio/driver.h>
 #include <linux/rfkill-gpio.h>
 #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);
 }