rk3026_86v: fix wifi open error and rk3028 camera error message
authorhjc <hjc@rock-chips.com>
Tue, 13 Aug 2013 04:04:05 +0000 (12:04 +0800)
committerhjc <hjc@rock-chips.com>
Thu, 15 Aug 2013 08:46:35 +0000 (16:46 +0800)
arch/arm/mach-rk3026/board-rk3026-86v.c
arch/arm/mach-rk3026/board-rk3028a-86v-camera.c

index 6002945b1d90f6b04a765a1a5e3316708f7f94d4..7cec856c0edba70ed4ae34ab218d93aa6b20ff55 100755 (executable)
@@ -800,11 +800,11 @@ static void rkusb_wifi_power(int on) {
        struct regulator *ldo = NULL;
        printk("hjc:%s[%d],on=%d\n",__func__,__LINE__,on);
 #if defined(CONFIG_MFD_TPS65910)       
-       if (pmic_is_tps65910() )
+       if (pmic_is_tps65910())
                ldo = regulator_get(NULL, "vmmc");  //vccio_wl
 #endif
 #if defined(CONFIG_REGULATOR_ACT8931)
-       if(pmic_is_act8931() )
+       if(pmic_is_act8931())
                ldo = regulator_get(NULL, "act_ldo4");  //vccio_wl
 #endif 
        
@@ -1152,11 +1152,13 @@ static struct pmu_info  tps65910_dcdc_info[] = {
 };
 
 static struct pmu_info tps65910_ldo_info[] = {
+
        {
                .name          = "vpll",   //vcc25
                .min_uv          = 1000000,
                .max_uv         = 2500000,
        },
+
        {
                .name          = "vdig1",    //vcc18_cif
                .min_uv          = 1800000,
@@ -1183,11 +1185,12 @@ static struct pmu_info tps65910_ldo_info[] = {
                .min_uv          = 3300000,
                .max_uv         = 3300000,
        },
-       {
+/*     {
                .name          = "vmmc",   //vcca30
                .min_uv          = 3000000,
                .max_uv         = 3000000,
        },
+*/
        {
                .name          = "vdac",   //
                .min_uv          = 1800000,
index f79b57ed2ed1d414be02bf3a1a1ed9f7e3e69559..538b86f4e812c07d661874d699de2c80da0f8c2b 100755 (executable)
@@ -36,14 +36,14 @@ Comprehensive camera device registration:
 static struct rkcamera_platform_data new_camera[] = { 
     new_camera_device(RK29_CAM_SENSOR_GC2035,
                         back,
-                        RK30_PIN3_PB3,
+                        RK30_PIN0_PB3,
                         0,
                         0,
                         1,
                         0),
     new_camera_device(RK29_CAM_SENSOR_GC0308,
                         front,
-                        RK30_PIN3_PD7,
+                        RK30_PIN0_PB2,
                         0,
                         0,
                         1,
@@ -240,8 +240,36 @@ static void rk_cif_power(int on)
 #if CONFIG_SENSOR_POWER_IOCTL_USR
 static int sensor_power_usr_cb (struct rk29camera_gpio_res *res,int on)
 {
-       //#error "CONFIG_SENSOR_POWER_IOCTL_USR is 1, sensor_power_usr_cb function must be writed!!";
-    rk_cif_power(on);
+           //#error "CONFIG_SENSOR_POWER_IOCTL_USR is 1, sensor_power_usr_cb function must be writed!!";
+       struct regulator *ldo_18,*ldo_28;
+           ldo_28 = regulator_get(NULL, "ldo7");   // vcc28_cif
+           ldo_18 = regulator_get(NULL, "ldo1");   // vcc18_cif
+       if (ldo_28 == NULL || IS_ERR(ldo_28) || ldo_18 == NULL || IS_ERR(ldo_18)){
+           printk("get cif ldo failed!\n");
+           return -1;
+       }
+       if(on == 0){
+           while(regulator_is_enabled(ldo_28)>0)   
+               regulator_disable(ldo_28);
+           regulator_put(ldo_28);
+           while(regulator_is_enabled(ldo_18)>0)
+               regulator_disable(ldo_18);
+           regulator_put(ldo_18);
+           mdelay(10);
+       } else {
+           regulator_set_voltage(ldo_28, 2800000, 2800000);
+           regulator_enable(ldo_28);
+           //printk("%s set ldo7 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_28));
+           regulator_put(ldo_28);
+       
+           regulator_set_voltage(ldo_18, 1800000, 1800000);
+           //regulator_set_suspend_voltage(ldo, 1800000);
+           regulator_enable(ldo_18);
+           //printk("%s set ldo1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo_18));
+           regulator_put(ldo_18);
+       }
+       
+       return 0;
 }
 #endif