mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
cw2217b: add some logs for soc jumping debug.
In order to debug the problem of fuel gauge soc jumping, add some debug logs, Change-Id: I5b6adf50d496126059366a0c322915a0f533acd4 Reviewed-on: https://gerrit.mot.com/2567828 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Wentao Xu <xuwt2@motorola.com> Reviewed-by: Tao Sun <suntao2@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
6f245b1a79
commit
e831fbc96e
1 changed files with 7 additions and 0 deletions
|
|
@ -707,6 +707,8 @@ static int cw2217_get_state(struct cw_battery *cw_bat)
|
|||
ret = cw_read(cw_bat->client, REG_MODE_CONFIG, ®_val);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
cw_printk("REG_MODE_CONFIG 0x%2x = 0x%2x\n", REG_MODE_CONFIG, reg_val);
|
||||
if (reg_val != CONFIG_MODE_ACTIVE)
|
||||
return CW2217_NOT_ACTIVE;
|
||||
|
||||
|
|
@ -802,6 +804,11 @@ static void cw_hw_init_work(struct work_struct *work)
|
|||
|
||||
cw_bat = container_of(work, struct cw_battery, hw_init_work);
|
||||
|
||||
ret = cw_init_data(cw_bat);
|
||||
if (ret) {
|
||||
printk("%s : cw2217 init data fail!\n", __func__);
|
||||
}
|
||||
|
||||
ret = cw_init(cw_bat);
|
||||
while ((loop++ < CW_RETRY_COUNT) && (ret != 0)) {
|
||||
msleep(CW_SLEEP_200MS);
|
||||
|
|
|
|||
Loading…
Reference in a new issue