Thread (9 messages) flat view 9 messages, 2 authors, 2011-02-09
STALE5657d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 current
  2. v1 [diff vs current]

[PATCH 3/6] PalmTC: switch to using gpio-vbus transceiver

From: Dmitry Eremin-Solenikov <hidden>
Date: 2011-02-02 17:00:00
Subsystem: arm port, pxa2xx/pxa3xx support, the rest · Maintainers: Russell King, Daniel Mack, Haojian Zhuang, Robert Jarzmik, Linus Torvalds

Switch from handling gpio-vbus in pxa25x_udc to using standard gpio-vbus
tranceiver.

Signed-off-by: Dmitry Eremin-Solenikov <redacted>
Cc: Marek Vasut <redacted>
---
 arch/arm/mach-pxa/palmtc.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-pxa/palmtc.c b/arch/arm/mach-pxa/palmtc.c
index 2131d58..fcc4490 100644
--- a/arch/arm/mach-pxa/palmtc.c
+++ b/arch/arm/mach-pxa/palmtc.c
@@ -25,6 +25,7 @@
 #include <linux/power_supply.h>
 #include <linux/gpio_keys.h>
 #include <linux/mtd/physmap.h>
+#include <linux/usb/gpio_vbus.h>
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
@@ -294,12 +295,21 @@ static struct platform_device palmtc_keyboard = {
 /******************************************************************************
  * UDC
  ******************************************************************************/
-static struct pxa2xx_udc_mach_info palmtc_udc_info __initdata = {
+static struct gpio_vbus_mach_info palmtc_udc_info = {
 	.gpio_vbus		= GPIO_NR_PALMTC_USB_DETECT_N,
 	.gpio_vbus_inverted	= 1,
 	.gpio_pullup		= GPIO_NR_PALMTC_USB_POWER,
 };
 
+static struct platform_device palmtc_gpio_vbus = {
+	.name	= "gpio-vbus",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &palmtc_udc_info,
+	},
+};
+
+
 /******************************************************************************
  * Touchscreen / Battery / GPIO-extender
  ******************************************************************************/
@@ -391,6 +401,7 @@ static struct platform_device *devices[] __initdata = {
 	&palmtc_keyboard,
 	&palmtc_pxa_keys,
 	&palmtc_flash,
+	&palmtc_gpio_vbus,
 };
 
 static void __init palmtc_init(void)
@@ -404,7 +415,6 @@ static void __init palmtc_init(void)
 
 	set_pxa_fb_info(&palmtc_lcd_screen);
 	pxa_set_mci_info(&palmtc_mci_platform_data);
-	pxa_set_udc_info(&palmtc_udc_info);
 	pxa_set_ac97_info(NULL);
 	pxa_set_ficp_info(&palmtc_ficp_platform_data);
 
-- 
1.7.2.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help