Loading drivers/power/supply/qcom/smb5-lib.c +12 −0 Original line number Diff line number Diff line Loading @@ -3873,6 +3873,7 @@ int smblib_get_prop_smb_health(struct smb_charger *chg) int rc; u8 stat; int input_present; union power_supply_propval prop = {0, }; rc = smblib_is_input_present(chg, &input_present); if (rc < 0) Loading @@ -3881,6 +3882,17 @@ int smblib_get_prop_smb_health(struct smb_charger *chg) if (input_present == INPUT_NOT_PRESENT) return POWER_SUPPLY_HEALTH_UNKNOWN; /* * SMB health is used only for CP, report UNKNOWN if * switcher is not enabled. */ if (is_cp_available(chg)) { rc = power_supply_get_property(chg->cp_psy, POWER_SUPPLY_PROP_CP_SWITCHER_EN, &prop); if (!rc && !prop.intval) return POWER_SUPPLY_HEALTH_UNKNOWN; } if (chg->wa_flags & SW_THERM_REGULATION_WA) { if (chg->smb_temp == -ENODATA) return POWER_SUPPLY_HEALTH_UNKNOWN; Loading Loading
drivers/power/supply/qcom/smb5-lib.c +12 −0 Original line number Diff line number Diff line Loading @@ -3873,6 +3873,7 @@ int smblib_get_prop_smb_health(struct smb_charger *chg) int rc; u8 stat; int input_present; union power_supply_propval prop = {0, }; rc = smblib_is_input_present(chg, &input_present); if (rc < 0) Loading @@ -3881,6 +3882,17 @@ int smblib_get_prop_smb_health(struct smb_charger *chg) if (input_present == INPUT_NOT_PRESENT) return POWER_SUPPLY_HEALTH_UNKNOWN; /* * SMB health is used only for CP, report UNKNOWN if * switcher is not enabled. */ if (is_cp_available(chg)) { rc = power_supply_get_property(chg->cp_psy, POWER_SUPPLY_PROP_CP_SWITCHER_EN, &prop); if (!rc && !prop.intval) return POWER_SUPPLY_HEALTH_UNKNOWN; } if (chg->wa_flags & SW_THERM_REGULATION_WA) { if (chg->smb_temp == -ENODATA) return POWER_SUPPLY_HEALTH_UNKNOWN; Loading