From 0cbedcde3cd5d4aec9cf70ef58f1ca8e3a7bfa8e Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Mon, 16 Jun 2014 14:39:00 +0800 Subject: [PATCH] rk3288:pmic:rk808&act8846&ricoh619:fixed msleep to mdelay in shutdown function --- drivers/mfd/ricoh619.c | 2 +- drivers/mfd/rk808.c | 2 +- drivers/power/ricoh619-battery.c | 8 ++++---- drivers/regulator/act8846.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/ricoh619.c b/drivers/mfd/ricoh619.c index e4e04dcddb1c..148cbbea84dc 100755 --- a/drivers/mfd/ricoh619.c +++ b/drivers/mfd/ricoh619.c @@ -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) diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index 4f348a526ab0..02446ee4bcfe 100755 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c @@ -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 = { diff --git a/drivers/power/ricoh619-battery.c b/drivers/power/ricoh619-battery.c index 012ab6b52b6b..ac5581e37681 100755 --- a/drivers/power/ricoh619-battery.c +++ b/drivers/power/ricoh619-battery.c @@ -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) { diff --git a/drivers/regulator/act8846.c b/drivers/regulator/act8846.c index f2a3442e4209..8c57878ae700 100755 --- a/drivers/regulator/act8846.c +++ b/drivers/regulator/act8846.c @@ -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"); } -- 2.34.1