From: 张晴 Date: Mon, 28 Apr 2014 02:26:01 +0000 (+0800) Subject: rk3288:syb827:set voltage by 10mv/2.4us X-Git-Tag: firefly_0821_release~5424 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=594bf2dd958cf0fac1363d6cac4fb827c40828f9;p=firefly-linux-kernel-4.4.55.git rk3288:syb827:set voltage by 10mv/2.4us --- diff --git a/drivers/regulator/syb827.c b/drivers/regulator/syb827.c index ec1ada5e11b3..5deee81604c8 100755 --- a/drivers/regulator/syb827.c +++ b/drivers/regulator/syb827.c @@ -233,7 +233,7 @@ static int syb827_dcdc_set_voltage_time_sel(struct regulator_dev *dev, unsigne if (new_volt < 0) return new_volt; - return DIV_ROUND_UP(abs(old_volt - new_volt), 10000); + return DIV_ROUND_UP(abs(old_volt - new_volt)*4, 10000); } static int syb827_dcdc_suspend_enable(struct regulator_dev *dev) { @@ -498,6 +498,8 @@ static int syb827_i2c_probe(struct i2c_client *i2c, const struct i2c_device_id * printk("The device is not syb827 %x \n",ret); goto err; } + + ret = syb827_set_bits(syb827,SYB827_CONTR_REG1,(1 << 6),(1<<6)); //10mv/2.4us if (syb827->dev->of_node) pdev = syb827_parse_dt(syb827);