rk30:Compatib with wm8326¡¢tps65910 and discrete dcdc
author张晴 <zhangqing@rock-chips.com>
Tue, 14 Aug 2012 08:11:16 +0000 (16:11 +0800)
committer张晴 <zhangqing@rock-chips.com>
Tue, 14 Aug 2012 08:11:16 +0000 (16:11 +0800)
arch/arm/mach-rk30/board-rk30-phonepad.c
arch/arm/mach-rk30/board-rk30-sdk-tps65910.c
drivers/regulator/rk30-pwm-regulator.c

index 9ec49404edf8e671d69f9a2251f8eb9df4fcd67f..c06b3936f0bce061f3573644fc5138c2eccc0c41 100755 (executable)
@@ -1653,9 +1653,6 @@ static struct platform_device device_rfkill_rk = {
 #endif
 
 static struct platform_device *devices[] __initdata = {
-#ifdef CONFIG_RK30_PWM_REGULATOR
-       &pwm_regulator_device[0],
-#endif
 #ifdef CONFIG_BACKLIGHT_RK29_BL
        &rk29_device_backlight,
 #endif
index d1fb1cfd80ed6c248fd81ad2608dad1644bfb21f..d61ef3f69c3654acb0065adaad56003da432094f 100755 (executable)
@@ -52,6 +52,7 @@ int tps65910_pre_init(struct tps65910 *tps65910){
                printk(KERN_ERR "Unable to write TPS65910_DEVCTRL2 reg\n");
                return err;
        }
+       
         #if 1
        /* set PSKIP=0 */
         val = tps65910_reg_read(tps65910, TPS65910_DCDCCTRL);
@@ -238,6 +239,10 @@ int tps65910_post_init(struct tps65910 *tps65910)
 
        g_pmic_type = PMIC_TYPE_TPS65910;
        printk("%s:g_pmic_type=%d\n",__func__,g_pmic_type);
+
+       #ifdef CONFIG_RK30_PWM_REGULATOR
+       platform_device_register(&pwm_regulator_device[0]);
+       #endif
        
        dcdc = regulator_get(NULL, "vio");      //vcc_io
        regulator_set_voltage(dcdc, 3000000, 3000000);
@@ -315,15 +320,6 @@ int tps65910_post_init(struct tps65910 *tps65910)
        printk("%s set vmmc vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
-
-       #ifdef CONFIG_RK30_PWM_REGULATOR
-       dcdc = regulator_get(NULL, "vdd_core"); // vdd_log
-       regulator_set_voltage(dcdc, 1100000, 1100000);
-       regulator_enable(dcdc);
-       printk("%s set vdd_core=%dmV end\n", __func__, regulator_get_voltage(dcdc));
-       regulator_put(dcdc);
-       udelay(100);
-       #endif
        
        printk("%s,line=%d END\n", __func__,__LINE__);
        
index f046b4496c0ced2d37b2a95aed0702806c5ab2c1..8b914cd565ccedf4adc23b33250b0c67465dacc3 100755 (executable)
@@ -255,7 +255,7 @@ static int __devinit pwm_regulator_probe(struct platform_device *pdev)
        int id = pdev->id;\r
        int ret ;\r
        char gpio_name[20];\r
-\r
+       \r
        if (!pdata)\r
                return -ENODEV;\r
 \r
@@ -451,7 +451,7 @@ static void __exit pwm_regulator_module_exit(void)
 }\r
 \r
 \r
-subsys_initcall(pwm_regulator_module_init);\r
+fs_initcall(pwm_regulator_module_init);\r
 \r
 module_exit(pwm_regulator_module_exit);\r
 \r