[PATCH 0/2] leds: tps6131x: Fix torch-to-flash transitions

From: jiegu

Date: Tue Nov 17 2026 - 01:44:00 EST


Our product uses the TI TPS61311 white flash LED controller.
The flashlight can be controlled in two modes: flash and torch.
Currently, there is a conflict when the torch is enabled and the
camera is opened. The torch is turned off while the camera is
active, but it is automatically re-enabled after the watchdog
timeout expires.
Also, When the device switches from torch mode to flash or
external strobe mode, the hardware torch output is disabled,
but the LED class brightness cache may still keep the previous
non-zero torch value.

This series fixes both issues by cancelling the pending torch refresh
work before switching modes and clearing the cached torch brightness
after a successful mode change.

Tested on a custom product board using the TI TPS61311.

gujie (2):
leds: tps6131x: cancel torch refresh on flash mode switch
leds: tps6131x: clear torch brightness cache on flash takeover

drivers/leds/flash/leds-tps6131x.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)

--
2.43.0