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/palmte2.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/palmte2.c')
-rw-r--r-- | arch/arm/mach-pxa/palmte2.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 43fcf2e8688..b09a9efeb77 100644 --- a/arch/arm/mach-pxa/palmte2.c +++ b/arch/arm/mach-pxa/palmte2.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/wm97xx_batt.h> | 26 | #include <linux/wm97xx_batt.h> |
27 | #include <linux/power_supply.h> | 27 | #include <linux/power_supply.h> |
28 | #include <linux/usb/gpio_vbus.h> | ||
28 | 29 | ||
29 | #include <asm/mach-types.h> | 30 | #include <asm/mach-types.h> |
30 | #include <asm/mach/arch.h> | 31 | #include <asm/mach/arch.h> |
@@ -318,11 +319,18 @@ static struct pxaficp_platform_data palmte2_ficp_platform_data = { | |||
318 | /****************************************************************************** | 319 | /****************************************************************************** |
319 | * UDC | 320 | * UDC |
320 | ******************************************************************************/ | 321 | ******************************************************************************/ |
321 | static struct pxa2xx_udc_mach_info palmte2_udc_info __initdata = { | 322 | static struct gpio_vbus_mach_info palmte2_udc_info = { |
322 | .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N, | 323 | .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N, |
323 | .gpio_vbus_inverted = 1, | 324 | .gpio_vbus_inverted = 1, |
324 | .gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP, | 325 | .gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP, |
325 | .gpio_pullup_inverted = 0, | 326 | }; |
327 | |||
328 | static struct platform_device palmte2_gpio_vbus = { | ||
329 | .name = "gpio-vbus", | ||
330 | .id = -1, | ||
331 | .dev = { | ||
332 | .platform_data = &palmte2_udc_info, | ||
333 | }, | ||
326 | }; | 334 | }; |
327 | 335 | ||
328 | /****************************************************************************** | 336 | /****************************************************************************** |
@@ -429,6 +437,7 @@ static struct platform_device *devices[] __initdata = { | |||
429 | #endif | 437 | #endif |
430 | &palmte2_backlight, | 438 | &palmte2_backlight, |
431 | &power_supply, | 439 | &power_supply, |
440 | &palmte2_gpio_vbus, | ||
432 | }; | 441 | }; |
433 | 442 | ||
434 | /* setup udc GPIOs initial state */ | 443 | /* setup udc GPIOs initial state */ |
@@ -447,7 +456,6 @@ static void __init palmte2_init(void) | |||
447 | set_pxa_fb_info(&palmte2_lcd_screen); | 456 | set_pxa_fb_info(&palmte2_lcd_screen); |
448 | pxa_set_mci_info(&palmte2_mci_platform_data); | 457 | pxa_set_mci_info(&palmte2_mci_platform_data); |
449 | palmte2_udc_init(); | 458 | palmte2_udc_init(); |
450 | pxa_set_udc_info(&palmte2_udc_info); | ||
451 | pxa_set_ac97_info(NULL); | 459 | pxa_set_ac97_info(NULL); |
452 | pxa_set_ficp_info(&palmte2_ficp_platform_data); | 460 | pxa_set_ficp_info(&palmte2_ficp_platform_data); |
453 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); | 461 | wm97xx_bat_set_pdata(&wm97xx_batt_pdata); |