diff options
author | Prabhu Kuttiyam <pkuttiyam@nvidia.com> | 2013-12-18 16:07:03 -0800 |
---|---|---|
committer | Bibek Basu <bbasu@nvidia.com> | 2013-12-18 23:09:58 -0800 |
commit | b714c5e402c1261c1860e4bda3db3da2c4919b45 (patch) | |
tree | a6c9de9bfc2b4b485e84e650ed752a721c12bc61 /drivers/regulator | |
parent | e972e1b2e1ae60ec7ecef5e633e91ee95b0defa9 (diff) |
regulator: as3722 : SD0 init val based on boardid
Decide the PMIC version based on board id as
AMS PMIC rev id is not correct in silicon.
Add DT support also.
Bug 1425474
Change-Id: Ia51462980da582c958a26e156b48a1e5d655559f
Signed-off-by: Prabhu Kuttiyam <pkuttiyam@nvidia.com>
Reviewed-on: http://git-master/r/347241
Reviewed-by: Bibek Basu <bbasu@nvidia.com>
Tested-by: Bibek Basu <bbasu@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/as3722-regulator.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c index 83a42764240e..f63a8420900f 100644 --- a/drivers/regulator/as3722-regulator.c +++ b/drivers/regulator/as3722-regulator.c @@ -785,7 +785,6 @@ static int as3722_regulator_probe(struct platform_device *pdev) struct regulator_ops *ops; int id; int ret; - u32 val; as3722_regs = devm_kzalloc(&pdev->dev, sizeof(*as3722_regs), GFP_KERNEL); @@ -863,11 +862,14 @@ static int as3722_regulator_probe(struct platform_device *pdev) else ops = &as3722_sd016_ops; if (id == AS3722_REGULATOR_ID_SD0) { - as3722_read(as3722, AS3722_FUSE15, &val); - if ((val & AS3722_NCELL_MASK) == 1) - as3722_regs->desc[id].min_uV = 610000; - else if ((val & AS3722_NCELL_MASK) == 2) + /* 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].uV_step = 10000; |