diff options
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r-- | arch/arm/mach-pxa/palmt5.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmte2.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmtx.c | 14 |
3 files changed, 33 insertions, 9 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); |
diff --git a/arch/arm/mach-pxa/palmte2.c b/arch/arm/mach-pxa/palmte2.c index 43fcf2e86887..b09a9efeb77c 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); |
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); |