]> git.karo-electronics.de Git - karo-tx-linux.git/commit
at91: at91-ohci: support overcurrent notification
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 13 Jul 2011 09:29:17 +0000 (11:29 +0200)
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 15 Oct 2011 15:37:27 +0000 (23:37 +0800)
commit4273a1e218588198d0f1d9484a40203d103a9bb7
treecac56be5051b5a32434c16415321499f54742b48
parentd8be695381e87f7740d8e9bd98b494e9d6c37121
at91: at91-ohci: support overcurrent notification

Several USB power switches (AIC1526 or MIC2026) have a digital output
that is used to notify that an overcurrent situation is taking
place. This digital outputs are typically connected to GPIO inputs of
the processor and can be used to be notified of those overcurrent
situations.

Therefore, we add a new overcurrent_pin[] array in the at91_usbh_data
structure so that boards can tell the AT91 OHCI driver which pins are
used for the overcurrent notification, and an overcurrent_supported
boolean to tell the driver whether overcurrent is supported or not.

The code has been largely borrowed from ohci-da8xx.c and
ohci-s3c2410.c.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/mach-at91/include/mach/board.h
drivers/usb/host/ohci-at91.c