]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/arm/mach-pxa/magician.c
Merge branches 'pm-avs' and 'pm-cpuidle'
[linux.git] / arch / arm / mach-pxa / magician.c
index 868dc0cf4859f2debe5b0bedf8d189726aa8fd1e..5d0591f93f4d06cbb864e864645430758ceb0783 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/regulator/fixed.h>
 #include <linux/regulator/gpio-regulator.h>
 #include <linux/regulator/machine.h>
-#include <linux/usb/gpio_vbus.h>
 #include <linux/platform_data/i2c-pxa.h>
 
 #include <mach/hardware.h>
@@ -506,9 +505,20 @@ static struct resource gpio_vbus_resource = {
        .end    = IRQ_MAGICIAN_VBUS,
 };
 
-static struct gpio_vbus_mach_info gpio_vbus_info = {
-       .gpio_pullup    = GPIO27_MAGICIAN_USBC_PUEN,
-       .gpio_vbus      = EGPIO_MAGICIAN_CABLE_VBUS,
+static struct gpiod_lookup_table gpio_vbus_gpiod_table = {
+       .dev_id = "gpio-vbus",
+       .table = {
+               /*
+                * EGPIO on register 4 index 1, the second EGPIO chip
+                * starts at register 4 so this will be at index 1 on that
+                * chip.
+                */
+               GPIO_LOOKUP("htc-egpio-1", 1,
+                           "vbus", GPIO_ACTIVE_HIGH),
+               GPIO_LOOKUP("gpio-pxa", GPIO27_MAGICIAN_USBC_PUEN,
+                           "pullup", GPIO_ACTIVE_HIGH),
+               { },
+       },
 };
 
 static struct platform_device gpio_vbus = {
@@ -516,9 +526,6 @@ static struct platform_device gpio_vbus = {
        .id             = -1,
        .num_resources  = 1,
        .resource       = &gpio_vbus_resource,
-       .dev = {
-               .platform_data = &gpio_vbus_info,
-       },
 };
 
 /*
@@ -1032,6 +1039,7 @@ static void __init magician_init(void)
                ARRAY_SIZE(pwm_backlight_supply), 5000000);
 
        gpiod_add_lookup_table(&bq24022_gpiod_table);
+       gpiod_add_lookup_table(&gpio_vbus_gpiod_table);
        platform_add_devices(ARRAY_AND_SIZE(devices));
 }