USB: tosa_udc_use_gpio_vbus.patch
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Fri, 21 Dec 2007 09:18:01 +0000 (12:18 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 1 Feb 2008 22:34:59 +0000 (14:34 -0800)
Use gpio_vbus instead of udc_is_connected for udc on tosa.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/arm/mach-pxa/tosa.c

index 1919756900f48daa9c12d64508a218a86f330f75..1a9c844ac7eb39e940903e8834a837513e2a9477 100644 (file)
@@ -157,15 +157,10 @@ static void tosa_udc_command(int cmd)
        }
 }
 
-static int tosa_udc_is_connected(void)
-{
-       return ((GPLR(TOSA_GPIO_USB_IN) & GPIO_bit(TOSA_GPIO_USB_IN)) == 0);
-}
-
-
 static struct pxa2xx_udc_mach_info udc_info __initdata = {
        .udc_command            = tosa_udc_command,
-       .udc_is_connected       = tosa_udc_is_connected,
+       .gpio_vbus              = TOSA_GPIO_USB_IN,
+       .gpio_vbus_inverted     = 1,
 };
 
 /*