Skip to content

Commit f80460c

Browse files
flavio-suligoilag-linaro
authored andcommitted
backlight: mp3309c: Fix LEDs flickering in PWM mode
The mp3309 has two configuration registers, named according to their address (0x00 and 0x01). In the second register (0x01), the bit DIMS (Dimming Mode Select) must be always 0 (zero), in both analog (via I2C commands) and PWM dimming mode. In the initial driver version, the DIMS bit was set in PWM mode and reset in analog mode. But if the DIMS bit is set in pwm dimming mode and other devices are connected on the same I2C bus, every I2C commands on the bus generates a flickering on the LEDs powered by the mp3309c. This change concerns the chip initialization and does not impact any existing device-tree configuration. Signed-off-by: Flavio Suligoi <f.suligoi@asem.it> Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> Link: https://lore.kernel.org/r/20240417153105.1794134-2-f.suligoi@asem.it Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 89c26f9 commit f80460c

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/video/backlight/mp3309c.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,10 @@ static int mp3309c_enable_device(struct mp3309c_chip *chip)
9797

9898
/*
9999
* I2C register #1 - Set working mode:
100-
* - set one of the two dimming mode:
101-
* - PWM dimming using an external PWM dimming signal
102-
* - analog dimming using I2C commands
103100
* - enable/disable synchronous mode
104101
* - set overvoltage protection (OVP)
105102
*/
106103
reg_val = 0x00;
107-
if (chip->pdata->dimming_mode == DIMMING_PWM)
108-
reg_val |= REG_I2C_1_DIMS;
109104
if (chip->pdata->sync_mode)
110105
reg_val |= REG_I2C_1_SYNC;
111106
reg_val |= chip->pdata->over_voltage_protection;

0 commit comments

Comments
 (0)