Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: lm3601x: Reset LED controller during probe

LED controller should be reset during initialization to avoid abnormal
behaviors. For example, when power to SoC is recycled but power to LED
controller is not, LED controller should not presume to be in original
state.

Signed-off-by: Jack Chen <zenghuchen@google.com>
Link: https://lore.kernel.org/r/20240801153048.3813581-1-zenghuchen@google.com
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Jack Chen and committed by
Lee Jones
70a4375e a0864cf3

+4
+4
drivers/leds/flash/leds-lm3601x.c
··· 443 443 return ret; 444 444 } 445 445 446 + ret = regmap_write(led->regmap, LM3601X_DEV_ID_REG, LM3601X_SW_RESET); 447 + if (ret) 448 + dev_warn(&client->dev, "Failed to reset the LED controller\n"); 449 + 446 450 mutex_init(&led->lock); 447 451 448 452 return lm3601x_register_leds(led, fwnode);