summaryrefslogtreecommitdiff
path: root/drivers/regulator
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2014-03-11 13:57:38 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2014-03-12 02:11:47 -0700
commitb1311d8afd840f5c66d51f27e3b56e72a34ebefc (patch)
tree5f6336005f1805b2e3a5450157ee0c035efb99c9 /drivers/regulator
parent6c45828760df11fbfa2d178f8359551b20b45268 (diff)
regulator: as3722: set minimum voltage based on device version
Support the AS3722 otp version 1V2 and later. Set the SD0 minimum voltage based on OTP version as 610mV for 1V0 and 1V1 else 410mV. bug 1435338 Change-Id: Ieb9c21cb5b6f0126ac27325a5b14403445c94ccb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/379902 Reviewed-by: Bibek Basu <bbasu@nvidia.com> Tested-by: Bibek Basu <bbasu@nvidia.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/as3722-regulator.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c
index f305177411e7..feecb258676f 100644
--- a/drivers/regulator/as3722-regulator.c
+++ b/drivers/regulator/as3722-regulator.c
@@ -863,17 +863,12 @@ static int as3722_regulator_probe(struct platform_device *pdev)
ops = &as3722_sd016_extcntrl_ops;
else
ops = &as3722_sd016_ops;
- if (id == AS3722_REGULATOR_ID_SD0) {
- /* AMS version revision id is wrong in silicon
- * and therefore this woraround to decide based
- * on boardID
- */
- if (as3722_device_rev(as3722, 1, 2))
- as3722_regs->desc[id].min_uV = 410000;
- else
- as3722_regs->desc[id].min_uV = 610000;
- } else
- as3722_regs->desc[id].min_uV = 610000;
+ as3722_regs->desc[id].min_uV = 610000;
+ /* AS3722 1V2/later for SD0 has mini_uV 410000 */
+ if ((id == AS3722_REGULATOR_ID_SD0) &&
+ as3722_device_rev_eq_later(as3722, 1, 2))
+ as3722_regs->desc[id].min_uV = 410000;
+
as3722_regs->desc[id].uV_step = 10000;
as3722_regs->desc[id].linear_min_sel = 1;
as3722_regs->desc[id].enable_time = 275;