From 8283fc01e898c77be6a61814dc8c87b3ddbbaba1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Thu, 14 Mar 2013 11:47:26 +0800 Subject: [PATCH] tps65910:set dcdc time step 12.5mv/us --- arch/arm/mach-rk30/board-pmu-tps65910.c | 5 ++++- drivers/regulator/tps65910-regulator.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-rk30/board-pmu-tps65910.c b/arch/arm/mach-rk30/board-pmu-tps65910.c index 75c1510bf450..ede21b277e56 100755 --- a/arch/arm/mach-rk30/board-pmu-tps65910.c +++ b/arch/arm/mach-rk30/board-pmu-tps65910.c @@ -92,7 +92,8 @@ int tps65910_pre_init(struct tps65910 *tps65910){ } val |= (1<<5); //when 1: 1.5 A - val |= (0x07<<2); //TSTEP[2:0] = 111 : 2.5 mV/¦Ìs(sampling 3 Mhz/5) + val &= (~(0x3 <<2)); + val |= (0x01<<2); //TSTEP[3:2] = 01 : 12.5 mV/us(sampling 3 Mhz) err = tps65910_reg_write(tps65910, TPS65910_VDD1, val); if (err) { printk(KERN_ERR "Unable to write TPS65910_VDD1 reg\n"); @@ -107,6 +108,8 @@ int tps65910_pre_init(struct tps65910 *tps65910){ } val |= (1<<5); //when 1: 1.5 A + val &= (~(0x3 <<2)); + val |= (0x01<<2); //TSTEP[3:2] = 01 : 12.5 mV/us(sampling 3 Mhz) err = tps65910_reg_write(tps65910, TPS65910_VDD2, val); if (err) { printk(KERN_ERR "Unable to write TPS65910_VDD2 reg\n"); diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index 22e06e2cb98e..88effd49700f 100755 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c @@ -936,7 +936,7 @@ static int tps65910_set_voltage_dcdc_time_sel(struct regulator_dev *dev, switch (id) { case TPS65910_REG_VDD1: case TPS65910_REG_VDD2: - return DIV_ROUND_UP(abs(old_volt - new_volt), 12500); + return DIV_ROUND_UP(abs(old_volt - new_volt)*2, 12500); case TPS65911_REG_VDDCTRL: return DIV_ROUND_UP(abs(old_volt - new_volt), 5000); } -- 2.34.1