Commit 23301b7f authored by Kim, Milo's avatar Kim, Milo Committed by Bryan Wu

leds-lp5523: turn off the LED engines on unloading the driver

The LP5523 has 3 engines which are used for running LED patterns.
These engines should be off while unloading the driver.
Obviously, LP5523 platform data are used for releasing the resource
such like enable()/release_resource(), but these are not mandatory.
Therefore this patch is required without the platform data dependency.
Signed-off-by: default avatarMilo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: default avatarBryan Wu <bryan.wu@canonical.com>
parent e0e02160
......@@ -997,6 +997,9 @@ static int lp5523_remove(struct i2c_client *client)
struct lp5523_chip *chip = i2c_get_clientdata(client);
int i;
/* Disable engine mode */
lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED);
lp5523_unregister_sysfs(client);
for (i = 0; i < chip->num_leds; i++) {
......
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