diff options
Diffstat (limited to 'drivers/leds/leds-lm3530.c')
| -rw-r--r-- | drivers/leds/leds-lm3530.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/leds/leds-lm3530.c b/drivers/leds/leds-lm3530.c index a036a19040f..c3182fae12e 100644 --- a/drivers/leds/leds-lm3530.c +++ b/drivers/leds/leds-lm3530.c @@ -486,6 +486,24 @@ static int lm3530_remove(struct i2c_client *client) return 0; } + +/*************************************************************************** + * lm3530_shutdown - make sure brightness is set to 0 + * + * The PMIC of the Olio H1 can't provide the power needed by the lm3530, + * in other words, it does it's own power management. This means we need + * to shut off power usage. Brightness of 0 should do this. + */ + +static void lm3530_shutdown(struct i2c_client *client) +{ + struct lm3530_data *drvdata = i2c_get_clientdata(client); + + lm3530_brightness_set(&(drvdata->led_dev), LED_OFF); + + return; +} + static const struct i2c_device_id lm3530_id[] = { {LM3530_NAME, 0}, {} @@ -495,6 +513,7 @@ MODULE_DEVICE_TABLE(i2c, lm3530_id); static struct i2c_driver lm3530_i2c_driver = { .probe = lm3530_probe, .remove = lm3530_remove, + .shutdown = lm3530_shutdown, .id_table = lm3530_id, .driver = { .name = LM3530_NAME, |