summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp55xx-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-lp55xx-common.c')
-rw-r--r--drivers/leds/leds-lp55xx-common.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/leds/leds-lp55xx-common.c b/drivers/leds/leds-lp55xx-common.c
index 6fede0b96715..74beb363b787 100644
--- a/drivers/leds/leds-lp55xx-common.c
+++ b/drivers/leds/leds-lp55xx-common.c
@@ -53,6 +53,16 @@ static int lp55xx_detect_device(struct lp55xx_chip *chip)
return 0;
}
+static int lp55xx_post_init_device(struct lp55xx_chip *chip)
+{
+ struct lp55xx_device_config *cfg = chip->cfg;
+
+ if (!cfg->post_init_device)
+ return 0;
+
+ return cfg->post_init_device(chip);
+}
+
int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val)
{
return i2c_smbus_write_byte_data(chip->cl, reg, val);
@@ -132,6 +142,11 @@ int lp55xx_init_device(struct lp55xx_chip *chip)
goto err;
}
+ /* chip specific initialization */
+ ret = lp55xx_post_init_device(chip);
+
+ return 0;
+
err:
return ret;
}
OpenPOWER on IntegriCloud