From e7da859e424ccc30d2ef87dbabf655ad3d59f291 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 13 Jul 2011 11:29:16 +0200 Subject: at91: ohci-at91: add vbus_pin_inverted platform attribute The existing OHCI AT91 driver made the assumption that the enable input of the USB power switch was active low. However, some USB power switches such as the Micrel MIC2026-1 [1] have an active high input to enable the power. A new vbus_pin_inverted attribute is added to the at91_usbh_data structure so that board files can tell the OHCI driver if the vbus pin logic is active low or active high. [1] http://www.micrel.com/page.do?page=product-info/products/mic2026.shtml Signed-off-by: Thomas Petazzoni Signed-off-by: Nicolas Ferre --- arch/arm/mach-at91/include/mach/board.h | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-at91/include') diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index ed544a0d5a1d..61d52dc05051 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h @@ -98,6 +98,7 @@ extern void __init at91_add_device_eth(struct at91_eth_data *data); struct at91_usbh_data { u8 ports; /* number of ports on root hub */ u8 vbus_pin[2]; /* port power-control pin */ + u8 vbus_pin_inverted; }; extern void __init at91_add_device_usbh(struct at91_usbh_data *data); extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); -- cgit v1.2.3 From aa6e52a35d388e730f4df0ec2ec48294590cc459 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 13 Jul 2011 11:29:17 +0200 Subject: 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 Signed-off-by: Nicolas Ferre --- arch/arm/mach-at91/include/mach/board.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'arch/arm/mach-at91/include') 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 { u8 ports; /* number of ports on root hub */ u8 vbus_pin[2]; /* port power-control pin */ u8 vbus_pin_inverted; + u8 overcurrent_supported; + u8 overcurrent_pin[2]; + u8 overcurrent_status[2]; + u8 overcurrent_changed[2]; }; extern void __init at91_add_device_usbh(struct at91_usbh_data *data); extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data); -- cgit v1.2.3