]> www.infradead.org Git - users/dwmw2/linux.git/commit
leds: pca963x: fix blink with hw acceleration
authorBernardo Rodrigues <bernardocrodrigues@live.com>
Sun, 5 Dec 2021 21:00:49 +0000 (18:00 -0300)
committerPavel Machek <pavel@ucw.cz>
Wed, 21 Sep 2022 10:50:47 +0000 (12:50 +0200)
commitfd6dd9584ed3ee6debf2e7f9c9e69ef09b368277
treec0dc592834260fc28382b9ed7885c47c3327f7db
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
leds: pca963x: fix blink with hw acceleration

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: Bernardo Rodrigues <bernardocrodrigues@live.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-pca963x.c