• Thomas Petazzoni's avatar
    at91: at91-ohci: support overcurrent notification · aa6e52a3
    Thomas Petazzoni authored
    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: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
    Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
    aa6e52a3
board.h 6.89 KB