phonepad:modify pwm regulator struct definition
authorlw <lw@rock-chips.com>
Tue, 31 Jul 2012 11:09:21 +0000 (19:09 +0800)
committerlw <lw@rock-chips.com>
Tue, 31 Jul 2012 11:09:21 +0000 (19:09 +0800)
arch/arm/mach-rk30/board-rk30-phonepad.c
drivers/regulator/rk30-pwm-regulator.c
include/linux/regulator/rk29-pwm-regulator.h

index 82a8f031d5ce1320cde8fb2fa3c61ebfdd184614..6870e47d299549b740e39ccaafd94274c9461c26 100755 (executable)
@@ -1552,7 +1552,7 @@ static struct pwm_platform_data pwm_regulator_info[1] = {
                .pwm_voltage = 1100000,
                .min_uV = 1000000,
                .max_uV = 1400000,
-               .duty_cycle = 455,      //45.5%
+               .coefficient = 455,     //45.5%
                .pwm_voltage_map = pwm_voltage_map,
                .init_data      = &pwm_regulator_init_dcdc[0],
        },
index 07ab738f1792937bd5360e48b426637ea7fcfcd6..46bf1b75982e1bd8ed0845e8fa972648f0661f6b 100755 (executable)
@@ -179,7 +179,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *dev,
        struct rk_pwm_dcdc *dcdc = rdev_get_drvdata(dev);\r
        const int *voltage_map = dcdc->pdata->pwm_voltage_map;\r
        int max = dcdc->pdata->max_uV;\r
-       int duty_cycle = dcdc->pdata->duty_cycle;\r
+       int coefficient = dcdc->pdata->coefficient;\r
        u32 size = dcdc->desc.n_voltages, i, vol,pwm_value;\r
 \r
        DBG("%s:  min_uV = %d, max_uV = %d\n",__FUNCTION__, min_uV,max_uV);\r
@@ -202,7 +202,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *dev,
        dcdc->pdata->pwm_voltage = vol;\r
 \r
        // VDD12 = 1.40 - 0.455*D , ÆäÖÐDΪPWMÕ¼¿Õ±È, \r
-       pwm_value = (max-vol)/duty_cycle/10;  // pwm_value %, duty_cycle = D*1000\r
+       pwm_value = (max-vol)/coefficient/10;  // pwm_value %, coefficient *1000\r
 \r
        if (pwm_set_rate(dcdc->pdata,1000*1000,pwm_value)!=0)\r
        {\r
index a8c691727f47c9241903f4fa769e7580c7666a59..70904dc447beacfae8a499dde33b7663d0a63424 100755 (executable)
@@ -57,7 +57,7 @@ struct pwm_platform_data {
        unsigned int    pwm_iomux_pwm;\r
        int     pwm_iomux_gpio;\r
        int     pwm_voltage;\r
-       int     duty_cycle;\r
+       int     coefficient;\r
        int     min_uV;\r
        int     max_uV;\r
        int     *pwm_voltage_map;\r