summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/bq2419x-regulator.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/regulator/bq2419x-regulator.c b/drivers/regulator/bq2419x-regulator.c
index 62cb7ee0e0b0..5b76b0d09314 100644
--- a/drivers/regulator/bq2419x-regulator.c
+++ b/drivers/regulator/bq2419x-regulator.c
@@ -163,8 +163,18 @@ static int __devinit bq2419x_regulator_probe(struct platform_device *pdev)
}
bq->rdev = rdev;
+
+ ret = regmap_update_bits(bq->chip->regmap, BQ2419X_OTG,
+ BQ2419X_OTG_ENABLE_MASK, 0x10);
+ if (ret < 0) {
+ dev_err(bq->dev, "register %d update failed with err %d",
+ BQ2419X_OTG, ret);
+ goto err_reg_update;
+ }
return 0;
+err_reg_update:
+ regulator_unregister(bq->rdev);
err_init:
if (gpio_is_valid(bq->gpio_otg_iusb))
gpio_free(bq->gpio_otg_iusb);