From 671e1181690611d8ba77e8947cff1f3b3d662a6c Mon Sep 17 00:00:00 2001 From: hjc Date: Tue, 13 Aug 2013 12:04:05 +0800 Subject: [PATCH] rk3026_86v: fix wifi open error and rk3028 camera error message --- arch/arm/mach-rk3026/board-rk3026-86v.c | 9 +++-- .../mach-rk3026/board-rk3028a-86v-camera.c | 36 ++++++++++++++++--- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-rk3026/board-rk3026-86v.c b/arch/arm/mach-rk3026/board-rk3026-86v.c index 6002945b1d90..7cec856c0edb 100755 --- a/arch/arm/mach-rk3026/board-rk3026-86v.c +++ b/arch/arm/mach-rk3026/board-rk3026-86v.c @@ -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, diff --git a/arch/arm/mach-rk3026/board-rk3028a-86v-camera.c b/arch/arm/mach-rk3026/board-rk3028a-86v-camera.c index f79b57ed2ed1..538b86f4e812 100755 --- a/arch/arm/mach-rk3026/board-rk3028a-86v-camera.c +++ b/arch/arm/mach-rk3026/board-rk3028a-86v-camera.c @@ -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 -- 2.34.1