Subject: [PATCH 2/3] at91-ohci: support overcurrent notification

From: [email-masked] (Matthieu CASTET)
Date: Tue, 5 Jul 2011 12:12:54 +0200

Thomas Petazzoni a ?crit :
> 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. The AT91 OHCI driver simply
> registers an interrupt handler which will log the entry and exit of an
> overcurrent situation in the kernel logs.
>
Why don't you forward the overcurrent notification to the usb stack ?
A printk is quite useless.

Matthieu