Skip to content

Commit

Permalink
leds-lp5523: turn off the LED engines on unloading the driver
Browse files Browse the repository at this point in the history
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: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
  • Loading branch information
Kim, Milo authored and Bryan Wu committed Sep 13, 2012
1 parent e0e0216 commit 23301b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/leds/leds-lp5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 23301b7

Please sign in to comment.