mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 16:46:15 -04:00
cw2217b: modify charging status
First unify the polarity of the current through the ibat_polority, then judge the charging state according to the polarity of the current. Change-Id: Ie2c155708e0c6808f56502325af0248e74e6c420 Reviewed-on: https://gerrit.mot.com/2620148 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-by: Guobin Zhang <zhanggb@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
f86c48d11b
commit
a07f15833d
1 changed files with 1 additions and 1 deletions
|
|
@ -1071,7 +1071,7 @@ static void cw_get_batt_status(struct cw_battery *cw_bat)
|
|||
cw_bat->batt_status = POWER_SUPPLY_STATUS_FULL;
|
||||
} else if (abs(batt_curr) < CW_CUR_ACCURACY) {
|
||||
cw_bat->batt_status = POWER_SUPPLY_STATUS_NOT_CHARGING;
|
||||
} else if (batt_curr * cw_bat->ibat_polority < 0) {
|
||||
} else if (batt_curr > 0) {
|
||||
cw_bat->batt_status = POWER_SUPPLY_STATUS_CHARGING;
|
||||
} else {
|
||||
cw_bat->batt_status = POWER_SUPPLY_STATUS_DISCHARGING;
|
||||
|
|
|
|||
Loading…
Reference in a new issue