Commit 70a4375e authored by Jack Chen's avatar Jack Chen Committed by Lee Jones

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: default avatarJack Chen <zenghuchen@google.com>
Link: https://lore.kernel.org/r/20240801153048.3813581-1-zenghuchen@google.comSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent a0864cf3
......@@ -443,6 +443,10 @@ static int lm3601x_probe(struct i2c_client *client)
return ret;
}
ret = regmap_write(led->regmap, LM3601X_DEV_ID_REG, LM3601X_SW_RESET);
if (ret)
dev_warn(&client->dev, "Failed to reset the LED controller\n");
mutex_init(&led->lock);
return lm3601x_register_leds(led, fwnode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment