Re: [PATCH 1/2] leds: tps6131x: cancel torch refresh on flash mode switch
From: Matthias Fend
Date: Thu Nov 19 2026 - 03:10:33 EST
Hi Jie,
Am 17.11.2026 um 07:43 schrieb jiegu:
From: gujie <jie.gu@xxxxxxxxxxxxxxxxxxxxxxx>
The TPS6131X torch mode uses a delayed work item to refresh the watchdog
timer and keep torch mode active when driven over I2C. If userspace enables
torch and then the camera stack switches the LED into flash or external
strobe mode, the pending refresh work can still run later and force the
device back into torch mode.
Cancel the pending torch refresh work before switching into flash mode from
both the LED flash class strobe path and the V4L2 external strobe path.
Signed-off-by: gujie <jie.gu@xxxxxxxxxxxxxxxxxxxxxxx>
---
drivers/leds/flash/leds-tps6131x.c | 2 ++
1 file changed, 2 insertions(+)
Tested with i.MX8MP-EVK and TPS61310EVM.
Reviewed-by: Matthias Fend <matthias.fend@xxxxxxxxx>
Tested-by: Matthias Fend <matthias.fend@xxxxxxxxx>
Best regards
~Matthias