ARM: 6209/3: at91_udc: Add vbus polarity and polling mode

Allow the vbus signal to optionally use polling. This is required if
the vbus signal is connected to an non-interrupting io expander for
example. If vbus is in polling mode, then it is assumed that the vbus
gpio may sleep. Also add an option to have vbus be an active low
signal. Both options are set in the platform data for the device.

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Ryan Mallon
2010-07-13 05:09:16 +01:00
committed by Russell King
parent 064baaca87
commit 4037242c4f
3 changed files with 57 additions and 13 deletions

View File

@@ -145,6 +145,8 @@ struct at91_udc {
void __iomem *udp_baseaddr;
int udp_irq;
spinlock_t lock;
struct timer_list vbus_timer;
struct work_struct vbus_timer_work;
};
static inline struct at91_udc *to_udc(struct usb_gadget *g)