Skip to content

Commit 70a4375

Browse files
zenghuchen-gglag-linaro
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent a0864cf commit 70a4375

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/leds/flash/leds-lm3601x.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ static int lm3601x_probe(struct i2c_client *client)
443443
return ret;
444444
}
445445

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+
446450
mutex_init(&led->lock);
447451

448452
return lm3601x_register_leds(led, fwnode);

0 commit comments

Comments
 (0)