tps65910:set dcdc time step 12.5mv/us
author张晴 <zhangqing@rock-chips.com>
Thu, 14 Mar 2013 03:47:26 +0000 (11:47 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 14 Mar 2013 03:47:26 +0000 (11:47 +0800)
arch/arm/mach-rk30/board-pmu-tps65910.c
drivers/regulator/tps65910-regulator.c

index 75c1510bf45036f6895ff7dd777bab1690d5d6ea..ede21b277e56a61514f0845a2daa36d93da2da23 100755 (executable)
@@ -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");
index 22e06e2cb98e7b8cf0f4551a0e0056aa8dd7e4ed..88effd49700f385fe3325e8fb76670d45a815979 100755 (executable)
@@ -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);
        }