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/palmt5.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/palmt5.c')
-rw-r--r-- | arch/arm/mach-pxa/palmt5.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 05bf979b78a6..76a6ea2893da 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
27 | #include <linux/wm97xx_batt.h> | 27 | #include <linux/wm97xx_batt.h> |
28 | #include <linux/power_supply.h> | 28 | #include <linux/power_supply.h> |
29 | #include <linux/usb/gpio_vbus.h> | ||
29 | 30 | ||
30 | #include <asm/mach-types.h> | 31 | #include <asm/mach-types.h> |
31 | #include <asm/mach/arch.h> | 32 | #include <asm/mach/arch.h> |
@@ -343,11 +344,18 @@ static struct pxaficp_platform_data palmt5_ficp_platform_data = { | |||
343 | /****************************************************************************** | 344 | /****************************************************************************** |
344 | * UDC | 345 | * UDC |
345 | ******************************************************************************/ | 346 | ******************************************************************************/ |
346 | static struct pxa2xx_udc_mach_info palmt5_udc_info __initdata = { | 347 | static struct gpio_vbus_mach_info palmt5_udc_info = { |
347 | .gpio_vbus = GPIO_NR_PALMT5_USB_DETECT_N, | 348 | .gpio_vbus = GPIO_NR_PALMT5_USB_DETECT_N, |
348 | .gpio_vbus_inverted = 1, | 349 | .gpio_vbus_inverted = 1, |
349 | .gpio_pullup = GPIO_NR_PALMT5_USB_PULLUP, | 350 | .gpio_pullup = GPIO_NR_PALMT5_USB_PULLUP, |
350 | .gpio_pullup_inverted = 0, | 351 | }; |
352 | |||
353 | static struct platform_device palmt5_gpio_vbus = { | ||
354 | .name = "gpio-vbus", | ||
355 | .id = -1, | ||
356 | .dev = { | ||
357 | .platform_data = &palmt5_udc_info, | ||
358 | }, | ||
351 | }; | 359 | }; |
352 | 360 | ||
353 | /****************************************************************************** | 361 | /****************************************************************************** |
@@ -500,6 +508,7 @@ static struct platform_device *devices[] __initdata = { | |||
500 | &palmt5_backlight, | 508 | &palmt5_backlight, |
501 | &power_supply, | 509 | &power_supply, |
502 | &palmt5_asoc, | 510 | &palmt5_asoc, |
511 | &palmt5_gpio_vbus, | ||
503 | }; | 512 | }; |
504 | 513 | ||
505 | /* setup udc GPIOs initial state */ | 514 | /* setup udc GPIOs initial state */ |
@@ -519,7 +528,6 @@ static void __init palmt5_init(void) | |||
519 | pxa_set_mci_info(&palmt5_mci_platform_data); | 528 | pxa_set_mci_info(&palmt5_mci_platform_data); |
520 | palmt5_udc_init(); | 529 | palmt5_udc_init(); |
521 | pxa_set_ac97_info(&palmt5_ac97_pdata); | 530 | pxa_set_ac97_info(&palmt5_ac97_pdata); |
522 | pxa_set_udc_info(&palmt5_udc_info); | ||
523 | pxa_set_ficp_info(&palmt5_ficp_platform_data); | 531 | pxa_set_ficp_info(&palmt5_ficp_platform_data); |
524 | pxa_set_keypad_info(&palmt5_keypad_platform_data); | 532 | pxa_set_keypad_info(&palmt5_keypad_platform_data); |
525 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); | 533 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); |