• Bernardo Rodrigues's avatar
    leds: pca963x: fix blink with hw acceleration · fd6dd958
    Bernardo Rodrigues authored
    LEDs would behave differently depending on the blink hardware
    acceleration configuration. This commit will make LEDs respond exactly
    the same independently of the hardware acceleration status.
    
    In other words, if you had two pca963x, side by side, one with blink
    hardware acceleration "ON" and the other "OFF; and performed some
    arbitrary sequence of API calls (e.g. turn on/off, change brightness,
    change blink mode, etc.) you probably would end with not matching LED
    states.
    
    'pca963x software blink' and 'leds-gpio' behavior were used as
    reference.
    
    Actual chip used to validate this change: pca9634
    
    Some of the unmatched behaviors being fixed are (when hw blink was "ON")
        - Leds would stop blinking when the brightness was changed.
        - Leds would persist their blinking mode even after being
          turned off (brightness = 0).
        - Leds would only blink if another led was solid (pca963x will be
          forced out of low power)
    Signed-off-by: default avatarBernardo Rodrigues <bernardocrodrigues@live.com>
    Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
    fd6dd958
leds-pca963x.c 11 KB