summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_eq.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-10-02 20:47:56 +0800
committerMark Brown <broonie@linaro.org>2013-10-03 16:49:21 +0100
commit43f6fc9542d6c42cc2e5783536ed31d90516c999 (patch)
treec2fba92b748b11674d9b984c3e8b2848b87f2d90 /drivers/infiniband/hw/mthca/mthca_eq.c
parentbc407334e9a6a745de5360395282beb2690adf48 (diff)
downloadop-kernel-dev-43f6fc9542d6c42cc2e5783536ed31d90516c999.zip
op-kernel-dev-43f6fc9542d6c42cc2e5783536ed31d90516c999.tar.gz
regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro
Fix off-by-one in the equation to calculate max_uV and also adjust the _min_uV setting accordingly. For LDOs: The voltage select bits set the LDO output voltage 0.825V...3.3V, 25mV steps ....00h : LDO off 01h-24h : V_LDO4 = 0.8V + ldo4_vsel * 25mV = 0.825V + (ldo4_vsel - 1h) * 25mV 25h-3Fh : do not use 40h-7Fh : V_LDO4 = 1.725V + (ldo4_vsel - 40h) * 25mV For SD2345: The voltage select bits set the DC/DC output voltage level and power the DC/DC converter down. ....00h : DC/DC powered down 01h-40h : V_SD2 = 0.6V + sd2_vsel * 12.5mV = 0.6125V + (sd2_vsel - 1h) * 12.5mV 41h-70h : V_SD2 = 1.4V + (sd2_vsel - 40h) * 25mV = 1.425V + (sd2_vsel - 41h) * 25mV 71h-7Fh : V_SD2 = 2.6V + (sd2_vsel - 70h) * 50mV = 2.65V + (sd2_vsel - 71h) * 50mV Note, the third entry in as3722_sd2345_ranges is wrong in current code. Fix it based on the datasheet. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_eq.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud