rk3288:pmic:rk808&act8846&ricoh619:fixed msleep to mdelay in shutdown function
author张晴 <zhangqing@rock-chips.com>
Mon, 16 Jun 2014 06:39:00 +0000 (14:39 +0800)
committer张晴 <zhangqing@rock-chips.com>
Mon, 16 Jun 2014 06:39:00 +0000 (14:39 +0800)
drivers/mfd/ricoh619.c
drivers/mfd/rk808.c
drivers/power/ricoh619-battery.c
drivers/regulator/act8846.c

index e4e04dcddb1c290cc3e3cdd3e1c7560ddf33cee6..148cbbea84dcaaba5cf3431c1e5defbab3b01bca 100755 (executable)
@@ -426,7 +426,7 @@ static void ricoh619_device_shutdown(struct i2c_client *client)
        ret = ricoh619_write(ricoh619->dev, RICOH619_INTC_INTEN, 0); 
        ret = ricoh619_clr_bits(ricoh619->dev,RICOH619_PWR_REP_CNT,(0x1<<0));//Not repeat power ON after power off(Power Off/N_OE)
        mutex_lock(&ricoh619->io_lock);
-       msleep(100);
+       mdelay(100);
 }
 EXPORT_SYMBOL_GPL(ricoh619_device_shutdown);
 static void ricoh619_power_off(void)
index 4f348a526ab0a0162e423b5cd9372523d50224c6..02446ee4bcfe4c973ba224c1dd6036953abc7a73 100755 (executable)
@@ -1157,7 +1157,7 @@ static void rk808_shutdown(void)
        ret = rk808_set_bits(rk808, RK808_INT_STS_MSK_REG1,(0x3<<5),(0x3<<5)); //close rtc int when power off
        ret = rk808_clear_bits(rk808, RK808_RTC_INT_REG,(0x3<<2)); //close rtc int when power off
        mutex_lock(&rk808->io_lock);
-       msleep(100);
+       mdelay(100);
 }
 
 static struct syscore_ops rk808_syscore_ops = {
index 012ab6b52b6b00f255e4dffb0f4b7068865e08ff..ac5581e37681fa49d5cc44ff2a228ce50d7ef4b8 100755 (executable)
@@ -1171,7 +1171,7 @@ static void ricoh619_displayed_work(struct work_struct *work)
                        info->soca->soc = calc_capacity(info) * 100;
                }
        }
-       if (RICOH619_SOCA_DISP == info->soca->status) {
+       else if (RICOH619_SOCA_DISP == info->soca->status) {
 
                info->soca->soc = calc_capacity_2(info);
 
@@ -4099,9 +4099,9 @@ static int ricoh619_batt_get_prop(struct power_supply *psy,
                if (info->entry_factory_mode){
                        val->intval = 100;
                        info->capacity = 100;
-               } else if (info->soca->displayed_soc < 0) {
-                       val->intval = 10;
-                       info->capacity = 10;
+               } else if ((info->soca->displayed_soc < 0) || (info->cur_voltage == 0)) {
+                       val->intval = 50;
+                       info->capacity = 50;
                } else {
                        if(info->chg_complete_tm_ov_flag == 1)
                        {
index f2a3442e4209a9cdcd52b70db74f39ca9efe1709..8c57878ae700ec962fac9d137ddc58558ce51071 100755 (executable)
@@ -802,7 +802,7 @@ void act8846_device_shutdown(void)
 #if 1
        if (act8846->pmic_hold_gpio) {
                        gpio_direction_output(act8846->pmic_hold_gpio,0);
-                       msleep(100);
+                       mdelay(100);
                        arm_pm_restart('h', "charge");
        }