Loading drivers/power/supply/qcom/qpnp-smb2.c +4 −0 Original line number Diff line number Diff line Loading @@ -927,6 +927,7 @@ static enum power_supply_property smb2_batt_props[] = { POWER_SUPPLY_PROP_DIE_HEALTH, POWER_SUPPLY_PROP_RERUN_AICL, POWER_SUPPLY_PROP_DP_DM, POWER_SUPPLY_PROP_CHARGE_COUNTER, }; static int smb2_batt_get_prop(struct power_supply *psy, Loading Loading @@ -1032,6 +1033,9 @@ static int smb2_batt_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_RERUN_AICL: val->intval = 0; break; case POWER_SUPPLY_PROP_CHARGE_COUNTER: rc = smblib_get_prop_batt_charge_counter(chg, val); break; default: pr_err("batt power supply prop %d not supported\n", psp); return -EINVAL; Loading drivers/power/supply/qcom/smb-lib.c +13 −0 Original line number Diff line number Diff line Loading @@ -1845,6 +1845,19 @@ int smblib_get_prop_charge_qnovo_enable(struct smb_charger *chg, return 0; } int smblib_get_prop_batt_charge_counter(struct smb_charger *chg, union power_supply_propval *val) { int rc; if (!chg->bms_psy) return -EINVAL; rc = power_supply_get_property(chg->bms_psy, POWER_SUPPLY_PROP_CHARGE_COUNTER, val); return rc; } /*********************** * BATTERY PSY SETTERS * ***********************/ Loading drivers/power/supply/qcom/smb-lib.h +2 −0 Original line number Diff line number Diff line Loading @@ -419,6 +419,8 @@ int smblib_get_prop_batt_current_now(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_batt_temp(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_batt_charge_counter(struct smb_charger *chg, union power_supply_propval *val); int smblib_set_prop_input_suspend(struct smb_charger *chg, const union power_supply_propval *val); int smblib_set_prop_batt_capacity(struct smb_charger *chg, Loading Loading
drivers/power/supply/qcom/qpnp-smb2.c +4 −0 Original line number Diff line number Diff line Loading @@ -927,6 +927,7 @@ static enum power_supply_property smb2_batt_props[] = { POWER_SUPPLY_PROP_DIE_HEALTH, POWER_SUPPLY_PROP_RERUN_AICL, POWER_SUPPLY_PROP_DP_DM, POWER_SUPPLY_PROP_CHARGE_COUNTER, }; static int smb2_batt_get_prop(struct power_supply *psy, Loading Loading @@ -1032,6 +1033,9 @@ static int smb2_batt_get_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_RERUN_AICL: val->intval = 0; break; case POWER_SUPPLY_PROP_CHARGE_COUNTER: rc = smblib_get_prop_batt_charge_counter(chg, val); break; default: pr_err("batt power supply prop %d not supported\n", psp); return -EINVAL; Loading
drivers/power/supply/qcom/smb-lib.c +13 −0 Original line number Diff line number Diff line Loading @@ -1845,6 +1845,19 @@ int smblib_get_prop_charge_qnovo_enable(struct smb_charger *chg, return 0; } int smblib_get_prop_batt_charge_counter(struct smb_charger *chg, union power_supply_propval *val) { int rc; if (!chg->bms_psy) return -EINVAL; rc = power_supply_get_property(chg->bms_psy, POWER_SUPPLY_PROP_CHARGE_COUNTER, val); return rc; } /*********************** * BATTERY PSY SETTERS * ***********************/ Loading
drivers/power/supply/qcom/smb-lib.h +2 −0 Original line number Diff line number Diff line Loading @@ -419,6 +419,8 @@ int smblib_get_prop_batt_current_now(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_batt_temp(struct smb_charger *chg, union power_supply_propval *val); int smblib_get_prop_batt_charge_counter(struct smb_charger *chg, union power_supply_propval *val); int smblib_set_prop_input_suspend(struct smb_charger *chg, const union power_supply_propval *val); int smblib_set_prop_batt_capacity(struct smb_charger *chg, Loading