Commit 8768dc9b authored by Marek Vasut's avatar Marek Vasut Committed by Eric Miao

[ARM] pxa/palm: Switch PalmT5, TX, TE2 to GPIO VBUS

Signed-off-by: default avatarMarek Vasut <marek.vasut@gmail.com>
Signed-off-by: default avatarEric Miao <eric.miao@marvell.com>
parent 96a9fcaf
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/wm97xx_batt.h> #include <linux/wm97xx_batt.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -343,11 +344,18 @@ static struct pxaficp_platform_data palmt5_ficp_platform_data = { ...@@ -343,11 +344,18 @@ static struct pxaficp_platform_data palmt5_ficp_platform_data = {
/****************************************************************************** /******************************************************************************
* UDC * UDC
******************************************************************************/ ******************************************************************************/
static struct pxa2xx_udc_mach_info palmt5_udc_info __initdata = { static struct gpio_vbus_mach_info palmt5_udc_info = {
.gpio_vbus = GPIO_NR_PALMT5_USB_DETECT_N, .gpio_vbus = GPIO_NR_PALMT5_USB_DETECT_N,
.gpio_vbus_inverted = 1, .gpio_vbus_inverted = 1,
.gpio_pullup = GPIO_NR_PALMT5_USB_PULLUP, .gpio_pullup = GPIO_NR_PALMT5_USB_PULLUP,
.gpio_pullup_inverted = 0, };
static struct platform_device palmt5_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &palmt5_udc_info,
},
}; };
/****************************************************************************** /******************************************************************************
...@@ -500,6 +508,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -500,6 +508,7 @@ static struct platform_device *devices[] __initdata = {
&palmt5_backlight, &palmt5_backlight,
&power_supply, &power_supply,
&palmt5_asoc, &palmt5_asoc,
&palmt5_gpio_vbus,
}; };
/* setup udc GPIOs initial state */ /* setup udc GPIOs initial state */
...@@ -519,7 +528,6 @@ static void __init palmt5_init(void) ...@@ -519,7 +528,6 @@ static void __init palmt5_init(void)
pxa_set_mci_info(&palmt5_mci_platform_data); pxa_set_mci_info(&palmt5_mci_platform_data);
palmt5_udc_init(); palmt5_udc_init();
pxa_set_ac97_info(&palmt5_ac97_pdata); pxa_set_ac97_info(&palmt5_ac97_pdata);
pxa_set_udc_info(&palmt5_udc_info);
pxa_set_ficp_info(&palmt5_ficp_platform_data); pxa_set_ficp_info(&palmt5_ficp_platform_data);
pxa_set_keypad_info(&palmt5_keypad_platform_data); pxa_set_keypad_info(&palmt5_keypad_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata); wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/wm97xx_batt.h> #include <linux/wm97xx_batt.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -318,11 +319,18 @@ static struct pxaficp_platform_data palmte2_ficp_platform_data = { ...@@ -318,11 +319,18 @@ static struct pxaficp_platform_data palmte2_ficp_platform_data = {
/****************************************************************************** /******************************************************************************
* UDC * UDC
******************************************************************************/ ******************************************************************************/
static struct pxa2xx_udc_mach_info palmte2_udc_info __initdata = { static struct gpio_vbus_mach_info palmte2_udc_info = {
.gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N, .gpio_vbus = GPIO_NR_PALMTE2_USB_DETECT_N,
.gpio_vbus_inverted = 1, .gpio_vbus_inverted = 1,
.gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP, .gpio_pullup = GPIO_NR_PALMTE2_USB_PULLUP,
.gpio_pullup_inverted = 0, };
static struct platform_device palmte2_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &palmte2_udc_info,
},
}; };
/****************************************************************************** /******************************************************************************
...@@ -429,6 +437,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -429,6 +437,7 @@ static struct platform_device *devices[] __initdata = {
#endif #endif
&palmte2_backlight, &palmte2_backlight,
&power_supply, &power_supply,
&palmte2_gpio_vbus,
}; };
/* setup udc GPIOs initial state */ /* setup udc GPIOs initial state */
...@@ -447,7 +456,6 @@ static void __init palmte2_init(void) ...@@ -447,7 +456,6 @@ static void __init palmte2_init(void)
set_pxa_fb_info(&palmte2_lcd_screen); set_pxa_fb_info(&palmte2_lcd_screen);
pxa_set_mci_info(&palmte2_mci_platform_data); pxa_set_mci_info(&palmte2_mci_platform_data);
palmte2_udc_init(); palmte2_udc_init();
pxa_set_udc_info(&palmte2_udc_info);
pxa_set_ac97_info(NULL); pxa_set_ac97_info(NULL);
pxa_set_ficp_info(&palmte2_ficp_platform_data); pxa_set_ficp_info(&palmte2_ficp_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata); wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/wm97xx_batt.h> #include <linux/wm97xx_batt.h>
#include <linux/power_supply.h> #include <linux/power_supply.h>
#include <linux/usb/gpio_vbus.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -359,11 +360,18 @@ static struct pxaficp_platform_data palmtx_ficp_platform_data = { ...@@ -359,11 +360,18 @@ static struct pxaficp_platform_data palmtx_ficp_platform_data = {
/****************************************************************************** /******************************************************************************
* UDC * UDC
******************************************************************************/ ******************************************************************************/
static struct pxa2xx_udc_mach_info palmtx_udc_info __initdata = { static struct gpio_vbus_mach_info palmtx_udc_info = {
.gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N, .gpio_vbus = GPIO_NR_PALMTX_USB_DETECT_N,
.gpio_vbus_inverted = 1, .gpio_vbus_inverted = 1,
.gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP, .gpio_pullup = GPIO_NR_PALMTX_USB_PULLUP,
.gpio_pullup_inverted = 0, };
static struct platform_device palmtx_gpio_vbus = {
.name = "gpio-vbus",
.id = -1,
.dev = {
.platform_data = &palmtx_udc_info,
},
}; };
/****************************************************************************** /******************************************************************************
...@@ -517,6 +525,7 @@ static struct platform_device *devices[] __initdata = { ...@@ -517,6 +525,7 @@ static struct platform_device *devices[] __initdata = {
&palmtx_backlight, &palmtx_backlight,
&power_supply, &power_supply,
&palmtx_asoc, &palmtx_asoc,
&palmtx_gpio_vbus,
}; };
static struct map_desc palmtx_io_desc[] __initdata = { static struct map_desc palmtx_io_desc[] __initdata = {
...@@ -552,7 +561,6 @@ static void __init palmtx_init(void) ...@@ -552,7 +561,6 @@ static void __init palmtx_init(void)
pxa_set_mci_info(&palmtx_mci_platform_data); pxa_set_mci_info(&palmtx_mci_platform_data);
palmtx_udc_init(); palmtx_udc_init();
pxa_set_ac97_info(&palmtx_ac97_pdata); pxa_set_ac97_info(&palmtx_ac97_pdata);
pxa_set_udc_info(&palmtx_udc_info);
pxa_set_ficp_info(&palmtx_ficp_platform_data); pxa_set_ficp_info(&palmtx_ficp_platform_data);
pxa_set_keypad_info(&palmtx_keypad_platform_data); pxa_set_keypad_info(&palmtx_keypad_platform_data);
wm97xx_bat_set_pdata(&wm97xx_batt_pdata); wm97xx_bat_set_pdata(&wm97xx_batt_pdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment