diff options
| author | Manuel Fombuena <fombuena@outlook.com> | 2026-07-02 23:33:16 +0100 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2026-07-09 10:52:08 +0100 |
| commit | 7cbe470366bdd43c7e8114fb2c4d74fa69093121 (patch) | |
| tree | a6d7e1a6c3eb57b4e64294a1792c1eeccf728fd6 /scripts | |
| parent | dcc31246aaf0d330a3ba9a725f56c33e6d634caa (diff) | |
| download | linux-7cbe470366bdd43c7e8114fb2c4d74fa69093121.tar.gz linux-7cbe470366bdd43c7e8114fb2c4d74fa69093121.zip | |
leds: st1202: Fix brightness having no effect while pattern mode is active
Once a hardware pattern is running (PATS=1), writing to the brightness
sysfs attribute only updates the ILED register. The visible output is
ILED x Pattern_PWM / 4095, so the change has little effect and the LED
never returns to steady static operation as the user expects.
The LED1202 has a single global sequencer shared across all channels.
Stopping it in brightness_set() to force static mode would halt running
patterns on all other active LEDs.
Instead, set all 8 PWM slots for the channel to ST1202_PATTERN_PWM_FULL
before writing ILED. With every step at full duty cycle, the output is
ILED x FULL / 4095 = ILED regardless of the sequencer state, without
disturbing other channels.
This also enables basic LED operation without the pattern trigger: with
the trigger set to none, the brightness sysfs attribute fully controls
the LED as a simple on/off device.
Fixes: 259230378c65 ("leds: Add LED1202 I2C driver")
Signed-off-by: Manuel Fombuena <fombuena@outlook.com>
Assisted-by: Claude:claude-sonnet-4-6
Link: https://patch.msgid.link/GV1PR08MB8497570FD162D0D42A9864E3C5F52@GV1PR08MB8497.eurprd08.prod.outlook.com
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
