summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorRakesh Bodla <rbodla@nvidia.com>2012-12-11 20:14:10 +0530
committerVarun Colbert <vcolbert@nvidia.com>2012-12-14 14:11:05 -0800
commit8d69a4f7776ff8c17d48ab4ffaabe4a834cfa690 (patch)
tree951591d1cac850ff8fc9f8680b213ddc9d11ecbd /drivers/regulator
parent1a876a397928be413a3771c2365795d857db89c5 (diff)
regulator: bq24192: Disable supply by default
Disable voltage supply by default. Bug 1179219 Change-Id: Ibf963a88be446acaf76ffa3364c6e6b12068fc16 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/170378 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
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);