Loading drivers/power/supply/qcom/smb5-lib.c +16 −0 Original line number Diff line number Diff line Loading @@ -1983,6 +1983,22 @@ int smblib_get_prop_batt_status(struct smb_charger *chg, } } rc = smblib_get_prop_batt_health(chg, &pval); if (rc < 0) { smblib_err(chg, "Couldn't get batt health rc=%d\n", rc); return rc; } /* * The charger status register shows charging even though the battery * is discharging when the over voltage condition is hit. Report power * supply state as NOT_CHARGING when the battery health reports * over voltage. */ if (pval.intval == POWER_SUPPLY_HEALTH_OVERVOLTAGE) { val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; return 0; } if (chg->dbc_usbov) { rc = smblib_get_prop_usb_present(chg, &pval); if (rc < 0) { Loading Loading
drivers/power/supply/qcom/smb5-lib.c +16 −0 Original line number Diff line number Diff line Loading @@ -1983,6 +1983,22 @@ int smblib_get_prop_batt_status(struct smb_charger *chg, } } rc = smblib_get_prop_batt_health(chg, &pval); if (rc < 0) { smblib_err(chg, "Couldn't get batt health rc=%d\n", rc); return rc; } /* * The charger status register shows charging even though the battery * is discharging when the over voltage condition is hit. Report power * supply state as NOT_CHARGING when the battery health reports * over voltage. */ if (pval.intval == POWER_SUPPLY_HEALTH_OVERVOLTAGE) { val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING; return 0; } if (chg->dbc_usbov) { rc = smblib_get_prop_usb_present(chg, &pval); if (rc < 0) { Loading