• Kevin Hilman's avatar
    ARM: DaVinci: i2c fixes from TI · 720bd003
    Kevin Hilman authored
    This patch fixes the I2C errors which were coming during the TI codec
    demos. These errors were due bus lockup and inappropriate enabling of
    interrupts.
    
    The patch incorporates the following:
    
    1. Enables GPIO power domain.
    2. Duty cycle of 50% (Initially it was set to 27%, which is for full
       speed mode).  
    3. udelay of 100 instead of the old while (cnt--) fix.
    4. Enables the inetrrupts before writing to ICMDR register.
    5. Sends a NACK and sends a clock on SCL line in case of cmd_complete
       failure and Bus busy error. 
    Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
    720bd003
i2c-davinci.c 14.8 KB