:charger:The battery level is not change during charging.

WHY:The value of batt_curr is negated, resulting in the wrong state of batt_status.
HOW:Delete the negation operation when assigning a value to batt_curr.
Change-Id: I66a23033f40e3583893613fad44b11bd796a2824
Reviewed-on: https://gerrit.mot.com/2703113
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
longc 2023-08-08 09:20:07 +08:00 • committed by longc152
commit 608b22acd0

View file

@ -410,7 +410,7 @@ static int cw_get_ui_full(struct cw_battery *cw_bat, int *ui_full) {
static void cw_get_batt_status(struct cw_battery *cw_bat)
{
long batt_curr = 0;
batt_curr = cw_bat->cw_current * CW_CUR_UNIT * (-1);
batt_curr = cw_bat->cw_current * CW_CUR_UNIT;
batt_curr *= cw_bat->ibat_polority;
if (cw_bat->voltage <= 0 || cw_bat->temp <= CW_BPD_TEMP)