aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-07-13 05:29:17 -0400
committerArnd Bergmann <arnd@arndb.de>2011-09-10 17:03:13 -0400
commitaa6e52a35d388e730f4df0ec2ec48294590cc459 (patch)
tree6286c7b93ea25e69bd242e7c4875ce6886a45a7e /arch/arm/mach-at91
parente7da859e424ccc30d2ef87dbabf655ad3d59f291 (diff)
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>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/include/mach/board.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 61d52dc05051..d07767f4052e 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -99,6 +99,10 @@ struct at91_usbh_data {
99 u8 ports; /* number of ports on root hub */ 99 u8 ports; /* number of ports on root hub */
100 u8 vbus_pin[2]; /* port power-control pin */ 100 u8 vbus_pin[2]; /* port power-control pin */
101 u8 vbus_pin_inverted; 101 u8 vbus_pin_inverted;
102 u8 overcurrent_supported;
103 u8 overcurrent_pin[2];
104 u8 overcurrent_status[2];
105 u8 overcurrent_changed[2];
102}; 106};
103extern void __init at91_add_device_usbh(struct at91_usbh_data *data); 107extern void __init at91_add_device_usbh(struct at91_usbh_data *data);
104extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); 108extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);