summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-04-23 12:35:53 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-04-23 11:26:56 +0100
commit1864b670902260d1c239f37e984f26de8fbad319 (patch)
tree0ed6e62d881a1b4999ae97e5dfc4a8a67ab42f78 /drivers/regulator
parent60d509fa6a9c4653a86ad830e4c4b30360b23f0e (diff)
downloadop-kernel-dev-1864b670902260d1c239f37e984f26de8fbad319.zip
op-kernel-dev-1864b670902260d1c239f37e984f26de8fbad319.tar.gz
regulator: tps62360: Fix off-by-one shift for ramp_ctrl
According to the datasheet[1] Register 0x06h Description: RmpCtrl (REGISTER ADDRESS: 0x06h Read/Write) BIT[5..7]: RMP[2:0] Output voltage ramp timing D7-D5 Slope 000 32mV/us 001 16mV/us 010 8mV/us ... 110 0.5mV/us 111 0.25mV/us Thus to get correct ramp_ctrl value, we need to right-shift 5 bits. [1] http://www.ti.com/lit/ds/symlink/tps62360.pdf Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps62360-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index acbd63f..612919c 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -278,7 +278,7 @@ static int tps62360_init_dcdc(struct tps62360_chip *tps,
__func__, REG_RAMPCTRL, ret);
return ret;
}
- ramp_ctrl = (ramp_ctrl >> 4) & 0x7;
+ ramp_ctrl = (ramp_ctrl >> 5) & 0x7;
/* ramp mV/us = 32/(2^ramp_ctrl) */
tps->desc.ramp_delay = DIV_ROUND_UP(32000, BIT(ramp_ctrl));
OpenPOWER on IntegriCloud