rk3168:modify defult voltage,modify some warnings
author张晴 <zhangqing@rock-chips.com>
Thu, 20 Dec 2012 08:47:10 +0000 (16:47 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 20 Dec 2012 08:47:10 +0000 (16:47 +0800)
arch/arm/mach-rk30/board-rk3168-tb.c
drivers/regulator/act8846.c
include/linux/regulator/act8846.h

index 547b8146f0e84c9b2d3218973a1e75c2ccf0e989..c9efd4925b0989b50fabcc408085b168e1e6415e 100644 (file)
@@ -1568,14 +1568,14 @@ static struct pmu_info  act8846_dcdc_info[] = {
        },
        {
                .name          = "vdd_core",    //logic
-               .min_uv          = 1100000,
-               .max_uv         = 1100000,
+               .min_uv          = 1000000,
+               .max_uv         = 1000000,
                .suspend_vol  =  900000,
        },
        {
                .name          = "vdd_cpu",   //arm
-               .min_uv          = 1100000,
-               .max_uv         = 1100000,
+               .min_uv          = 1000000,
+               .max_uv         = 1000000,
                .suspend_vol  =  900000,
        },
        {
@@ -1589,18 +1589,18 @@ static struct pmu_info  act8846_dcdc_info[] = {
 static  struct pmu_info  act8846_ldo_info[] = {
        {
                .name          = "act_ldo1",   //vdd11
-               .min_uv          = 1100000,
-               .max_uv         = 1100000,
+               .min_uv          = 1000000,
+               .max_uv         = 1000000,
        },
        {
-               .name          = "act_ldo2",    //vcc25
-               .min_uv          = 2500000,
-               .max_uv         = 2500000,
+               .name          = "act_ldo2",    //vdd12
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
        },
        {
                .name          = "act_ldo3",   //vcc18_cif
-               .min_uv          = 1900000,
-               .max_uv         = 1900000,
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
        },
        {
                .name          = "act_ldo4",   //vcca33
index a56f3c4ced6faee56d50adedfa2f7a9b33345b70..4ea222176b868bd57e72e3101aacd1829959cede 100755 (executable)
@@ -175,7 +175,7 @@ static int act8846_ldo_enable(struct regulator_dev *dev)
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int ldo= rdev_get_id(dev) - ACT8846_LDO1;
        u16 mask=0x80;  
-       int ret;
+       
        return act8846_set_bits(act8846, act8846_LDO_CONTR_REG(ldo), mask, 0x80);
        
 }
@@ -184,7 +184,7 @@ static int act8846_ldo_disable(struct regulator_dev *dev)
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int ldo= rdev_get_id(dev) - ACT8846_LDO1;
        u16 mask=0x80;
-       int ret;
+       
        return act8846_set_bits(act8846, act8846_LDO_CONTR_REG(ldo), mask, 0);
 
 }
@@ -200,7 +200,7 @@ static int act8846_ldo_get_voltage(struct regulator_dev *dev)
        return val;
 }
 static int act8846_ldo_set_voltage(struct regulator_dev *dev,
-                                 int min_uV, int max_uV)
+                                 int min_uV, int max_uV,unsigned *selector)
 {
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int ldo= rdev_get_id(dev) - ACT8846_LDO1;
@@ -222,11 +222,10 @@ static int act8846_ldo_set_voltage(struct regulator_dev *dev,
 
        ret = act8846_set_bits(act8846, act8846_LDO_SET_VOL_REG(ldo),
                LDO_VOL_MASK, val);
-       if (ret)
-               return ret;
+       return ret;
 
 }
-static int act8846_ldo_get_mode(struct regulator_dev *dev, unsigned index)
+static unsigned int act8846_ldo_get_mode(struct regulator_dev *dev)
 {
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int ldo = rdev_get_id(dev) - ACT8846_LDO1;
@@ -321,7 +320,7 @@ static int act8846_dcdc_get_voltage(struct regulator_dev *dev)
        return val;
 }
 static int act8846_dcdc_set_voltage(struct regulator_dev *dev,
-                                 int min_uV, int max_uV)
+                                 int min_uV, int max_uV,unsigned *selector)
 {
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int buck = rdev_get_id(dev) - ACT8846_DCDC1;
@@ -347,11 +346,11 @@ static int act8846_dcdc_set_voltage(struct regulator_dev *dev,
        return ret;
 }
 static int act8846_dcdc_set_sleep_voltage(struct regulator_dev *dev,
-                                 int min_uV, int max_uV)
+                                           int uV)
 {
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int buck = rdev_get_id(dev) - ACT8846_DCDC1;
-       int min_vol = min_uV / 1000, max_vol = max_uV / 1000;
+       int min_vol = uV / 1000,max_vol = uV / 1000;
        const int *vol_map = buck_voltage_map;
        u16 val;
        int ret = 0;
@@ -368,11 +367,11 @@ static int act8846_dcdc_set_sleep_voltage(struct regulator_dev *dev,
 
        if (vol_map[val] > max_vol)
                printk("WARNING:this voltage is not support!voltage set is %d mv\n",vol_map[val]);
-          ret = act8846_set_bits(act8846, act8846_BUCK_SET_VOL_REG(buck) + 0x01,
+          ret = act8846_set_bits(act8846, (act8846_BUCK_SET_VOL_REG(buck) + 0x01),
                                 BUCK_VOL_MASK, val);
        return ret;
 }
-static int act8846_dcdc_get_mode(struct regulator_dev *dev, unsigned index)
+static unsigned int act8846_dcdc_get_mode(struct regulator_dev *dev)
 {
        struct act8846 *act8846 = rdev_get_drvdata(dev);
        int buck = rdev_get_id(dev) - ACT8846_DCDC1;
index 8eaacdcc5e732271fd62b2476e05079016122d34..8e8bbd5f84dea410fddb2bc23c14cbfbeb149d14 100755 (executable)
@@ -24,7 +24,7 @@
 #define ACT8846_LDO1 4                //(4+ACT8846_START)
 
 
-#define act8846_NUM_REGULATORS 7
+#define act8846_NUM_REGULATORS 13
 struct act8846;
 
 struct act8846_regulator_subdev {