mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
FG: apply rt9426a 0015 patch
1. remove pm_wakeup on fg_update_work_func, becase update_work will be cancle when the device into suspend. 2. Relax the unseal state determination criteria, and the unseal only determines the bit0 3. update Correct unknown error. about writing rt9426a_reg_swindows value, moto did not use this function Change-Id: I38e2acd5b11fb78e722b6cb86e192ac389057705 Signed-off-by: liuyc20 <liuyc20@lenovo.com> Reviewed-on: https://gerrit.mot.com/2156775 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
de31178d74
commit
b6b28fc271
2 changed files with 4 additions and 7 deletions
|
|
@ -1226,7 +1226,7 @@ static int rt_fg_set_property(struct power_supply *psy,
|
|||
/* write aging fc_vth */
|
||||
rt9426a_write_page_cmd(chip, RT9426A_PAGE_5);
|
||||
rt9426a_reg_write_word(chip->i2c, RT9426A_REG_SWINDOW3,
|
||||
(chip->pdata->fc_vth[chip->ocv_index]) | (chip->pdata->extreg_table[5].data[5] << 8));
|
||||
(chip->pdata->fc_vth[chip->ocv_index]) | (chip->pdata->extreg_table[4].data[5] << 8));
|
||||
mutex_unlock(&chip->update_lock);
|
||||
/* update ocv checksum */
|
||||
chip->ocv_checksum_dtsi = *((u32 *)chip->pdata->ocv_table +
|
||||
|
|
@ -2828,13 +2828,10 @@ static void fg_update_work_func(struct work_struct *work)
|
|||
{
|
||||
struct rt9426a_chip *chip = container_of(work, struct rt9426a_chip, update_work.work);
|
||||
|
||||
pm_wakeup_hard_event(chip->dev);
|
||||
pm_stay_awake(chip->dev);
|
||||
dev_info(chip->dev, "%s++\n", __func__);
|
||||
rt9426a_update_info(chip);
|
||||
queue_delayed_work(system_power_efficient_wq, &chip->update_work, 20 * HZ);
|
||||
dev_info(chip->dev, "%s--\n", __func__);
|
||||
pm_relax(chip->dev);
|
||||
}
|
||||
|
||||
static int rt9426a_i2c_probe(struct i2c_client *i2c)
|
||||
|
|
@ -2982,7 +2979,7 @@ static int rt9426a_i2c_suspend(struct device *dev)
|
|||
{
|
||||
struct rt9426a_chip *chip = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(chip->dev, "%s\n", __func__);
|
||||
dev_info(chip->dev, "%s\n", __func__);
|
||||
if (device_may_wakeup(dev))
|
||||
enable_irq_wake(chip->alert_irq);
|
||||
disable_irq(chip->alert_irq);
|
||||
|
|
@ -2996,7 +2993,7 @@ static int rt9426a_i2c_resume(struct device *dev)
|
|||
{
|
||||
struct rt9426a_chip *chip = dev_get_drvdata(dev);
|
||||
|
||||
dev_dbg(chip->dev, "%s\n", __func__);
|
||||
dev_info(chip->dev, "%s\n", __func__);
|
||||
enable_irq(chip->alert_irq);
|
||||
if (device_may_wakeup(dev))
|
||||
disable_irq_wake(chip->alert_irq);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
#define RT9426A_BATEXIST_FLAG_MASK 0x8000
|
||||
#define RT9426A_USR_TBL_USED_MASK 0x0800
|
||||
#define RT9426A_CSCOMP1_OCV_MASK 0x0300
|
||||
#define RT9426A_UNSEAL_MASK 0x0003
|
||||
#define RT9426A_UNSEAL_MASK 0x0001
|
||||
#define RT9426A_UNSEAL_STATUS 0x0001
|
||||
#define RT9426A_GAUGE_BUSY_MASK 0x0008
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue