mirror of
https://github.com/torvalds/linux.git
synced 2026-09-15 15:01:08 -04:00
USB: pxa2xx_udc understands GPIO based VBUS sensing
This updates the PXA 25x UDC board-independent infrastructure for VBUS sensing and the D+ pullup. The original code evolved from rather bizarre support on Intel's "Lubbock" reference hardware, so that on more sensible hardware it doesn't work as well as it could/should. The change is just to teach the UDC driver how to use built-in PXA GPIO pins directly. This reduces the amount of board-specfic object code needed, and enables the use of a VBUS sensing IRQ on boards (like Gumstix) that have one. With VBUS sensing, the UDC is unclocked until a host is actually connected. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3a16f7b4a7
commit
b2bbb20b37
@@ -12,6 +12,14 @@ struct pxa2xx_udc_mach_info {
|
||||
void (*udc_command)(int cmd);
|
||||
#define PXA2XX_UDC_CMD_CONNECT 0 /* let host see us */
|
||||
#define PXA2XX_UDC_CMD_DISCONNECT 1 /* so host won't see us */
|
||||
|
||||
/* Boards following the design guidelines in the developer's manual,
|
||||
* with on-chip GPIOs not Lubbock's wierd hardware, can have a sane
|
||||
* VBUS IRQ and omit the methods above. Store the GPIO number
|
||||
* here; for GPIO 0, also mask in one of the pxa_gpio_mode() bits.
|
||||
*/
|
||||
u16 gpio_vbus; /* high == vbus present */
|
||||
u16 gpio_pullup; /* high == pullup activated */
|
||||
};
|
||||
|
||||
extern void pxa_set_udc_info(struct pxa2xx_udc_mach_info *info);
|
||||
|
||||
Reference in New Issue
Block a user