diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2009-04-23 05:12:37 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2009-06-04 22:41:48 -0400 |
commit | 8768dc9b75efa43e612f6f520cf76a89bbab69d3 (patch) | |
tree | 3628a2b1fdef74d9716481f222d283c45bf5c5b8 /arch/arm/mach-pxa/palmtx.c | |
parent | 96a9fcaf5d9a04f3ca8855d7b8d034089ccc8533 (diff) |
[ARM] pxa/palm: Switch PalmT5, TX, TE2 to GPIO VBUS
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch/arm/mach-pxa/palmtx.c')
-rw-r--r-- | arch/arm/mach-pxa/palmtx.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/palmtx.c b/arch/arm/mach-pxa/palmtx.c index e99a893c58a7..3ed5ae0371cb 100644 --- a/arch/arm/mach-pxa/palmtx.c +++ b/arch/arm/mach-pxa/palmtx.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
28 | #include <linux/wm97xx_batt.h> | 28 | #include <linux/wm97xx_batt.h> |
29 | #include <linux/power_supply.h> | 29 | #include <linux/power_supply.h> |
30 | #include <linux/usb/gpio_vbus.h> | ||
30 | 31 | ||
31 | #include <asm/mach-types.h> | 32 | #include <asm/mach-types.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
@@ -359,11 +360,18 @@ static struct pxaficp_platform_data palmtx_ficp_platform_data = { | |||
359 | /****************************************************************************** | 360 | /****************************************************************************** |
360 | * UDC | 361 | * UDC |
361 | ******************************************************************************/ | 362 | ******************************************************************************/ |
362 | static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = { | 363 | static struct gpio_vbus_mach_info palmtx_udc_info = { |
363 | .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N, | 364 | .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N, |
364 | .gpio_vbus_inverted = 1, | 365 | .gpio_vbus_inverted = 1, |
365 | .gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP, | 366 | .gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP, |
366 | .gpio_pullup_inverted = 0, | 367 | }; |
368 | |||
369 | static struct platform_device palmtx_gpio_vbus = { | ||
370 | .name = "gpio-vbus", | ||
371 | .id = -1, | ||
372 | .dev = { | ||
373 | .platform_data = &palmtx_udc_info, | ||
374 | }, | ||
367 | }; | 375 | }; |
368 | 376 | ||
369 | /****************************************************************************** | 377 | /****************************************************************************** |
@@ -517,6 +525,7 @@ static struct platform_device *devices[] __initdata = { | |||
517 | &palmtx_backlight, | 525 | &palmtx_backlight, |
518 | &power_supply, | 526 | &power_supply, |
519 | &palmtx_asoc, | 527 | &palmtx_asoc, |
528 | &palmtx_gpio_vbus, | ||
520 | }; | 529 | }; |
521 | 530 | ||
522 | static struct map_desc palmtx_io_desc[] __initdata = { | 531 | static struct map_desc palmtx_io_desc[] __initdata = { |
@@ -552,7 +561,6 @@ static void __init palmtx_init(void) | |||
552 | pxa_set_mci_info(&palmtx_mci_platform_data); | 561 | pxa_set_mci_info(&palmtx_mci_platform_data); |
553 | palmtx_udc_init(); | 562 | palmtx_udc_init(); |
554 | pxa_set_ac97_info(&palmtx_ac97_pdata); | 563 | pxa_set_ac97_info(&palmtx_ac97_pdata); |
555 | pxa_set_udc_info(&palmtx_udc_info); | ||
556 | pxa_set_ficp_info(&palmtx_ficp_platform_data); | 564 | pxa_set_ficp_info(&palmtx_ficp_platform_data); |
557 | pxa_set_keypad_info(&palmtx_keypad_platform_data); | 565 | pxa_set_keypad_info(&palmtx_keypad_platform_data); |
558 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); | 566 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); |