diff options
author | Kim, Milo <Milo.Kim@ti.com> | 2012-09-12 08:16:00 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@canonical.com> | 2012-09-12 23:48:34 -0400 |
commit | 23301b7f1b8910fb3ba84935edbf665808f53871 (patch) | |
tree | 23713681b05dc740ee0fdf59f3c2f2b7f400df24 /drivers/leds/leds-lp5523.c | |
parent | e0e021600e3ebb80d6539cc5f8de8f9d19687e80 (diff) |
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: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <bryan.wu@canonical.com>
Diffstat (limited to 'drivers/leds/leds-lp5523.c')
-rw-r--r-- | drivers/leds/leds-lp5523.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 3d60428df643..5ebdc9245d59 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c | |||
@@ -997,6 +997,9 @@ static int lp5523_remove(struct i2c_client *client) | |||
997 | struct lp5523_chip *chip = i2c_get_clientdata(client); | 997 | struct lp5523_chip *chip = i2c_get_clientdata(client); |
998 | int i; | 998 | int i; |
999 | 999 | ||
1000 | /* Disable engine mode */ | ||
1001 | lp5523_write(client, LP5523_REG_OP_MODE, LP5523_CMD_DISABLED); | ||
1002 | |||
1000 | lp5523_unregister_sysfs(client); | 1003 | lp5523_unregister_sysfs(client); |
1001 | 1004 | ||
1002 | for (i = 0; i < chip->num_leds; i++) { | 1005 | for (i = 0; i < chip->num_leds; i++) { |