Loading drivers/power/supply/qcom/qpnp-qg.c +1 −1 Original line number Diff line number Diff line Loading @@ -1890,7 +1890,7 @@ static int qg_charge_full_update(struct qpnp_qg *chip) /* Force recharge */ prop.intval = 0; rc = power_supply_set_property(chip->batt_psy, POWER_SUPPLY_PROP_RECHARGE_SOC, &prop); POWER_SUPPLY_PROP_FORCE_RECHARGE, &prop); if (rc < 0) pr_err("Failed to force recharge rc=%d\n", rc); else Loading drivers/power/supply/qcom/qpnp-smb5.c +13 −0 Original line number Diff line number Diff line Loading @@ -1173,6 +1173,7 @@ static enum power_supply_property smb5_batt_props[] = { POWER_SUPPLY_PROP_CYCLE_COUNT, POWER_SUPPLY_PROP_RECHARGE_SOC, POWER_SUPPLY_PROP_CHARGE_FULL, POWER_SUPPLY_PROP_FORCE_RECHARGE, }; static int smb5_batt_get_prop(struct power_supply *psy, Loading Loading @@ -1288,6 +1289,9 @@ static int smb5_batt_get_prop(struct power_supply *psy, rc = smblib_get_prop_from_bms(chg, POWER_SUPPLY_PROP_CHARGE_FULL, val); break; case POWER_SUPPLY_PROP_FORCE_RECHARGE: val->intval = 0; break; default: pr_err("batt power supply prop %d not supported\n", psp); return -EINVAL; Loading Loading @@ -1367,6 +1371,15 @@ static int smb5_batt_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_RECHARGE_SOC: rc = smblib_set_prop_rechg_soc_thresh(chg, val); break; case POWER_SUPPLY_PROP_FORCE_RECHARGE: /* toggle charging to force recharge */ vote(chg->chg_disable_votable, FORCE_RECHARGE_VOTER, true, 0); /* charge disable delay */ msleep(50); vote(chg->chg_disable_votable, FORCE_RECHARGE_VOTER, false, 0); break; default: rc = -EINVAL; } Loading drivers/power/supply/qcom/smb5-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ enum print_reason { #define WBC_VOTER "WBC_VOTER" #define HW_LIMIT_VOTER "HW_LIMIT_VOTER" #define PL_SMB_EN_VOTER "PL_SMB_EN_VOTER" #define FORCE_RECHARGE_VOTER "FORCE_RECHARGE_VOTER" #define BOOST_BACK_STORM_COUNT 3 #define WEAK_CHG_STORM_COUNT 8 Loading Loading
drivers/power/supply/qcom/qpnp-qg.c +1 −1 Original line number Diff line number Diff line Loading @@ -1890,7 +1890,7 @@ static int qg_charge_full_update(struct qpnp_qg *chip) /* Force recharge */ prop.intval = 0; rc = power_supply_set_property(chip->batt_psy, POWER_SUPPLY_PROP_RECHARGE_SOC, &prop); POWER_SUPPLY_PROP_FORCE_RECHARGE, &prop); if (rc < 0) pr_err("Failed to force recharge rc=%d\n", rc); else Loading
drivers/power/supply/qcom/qpnp-smb5.c +13 −0 Original line number Diff line number Diff line Loading @@ -1173,6 +1173,7 @@ static enum power_supply_property smb5_batt_props[] = { POWER_SUPPLY_PROP_CYCLE_COUNT, POWER_SUPPLY_PROP_RECHARGE_SOC, POWER_SUPPLY_PROP_CHARGE_FULL, POWER_SUPPLY_PROP_FORCE_RECHARGE, }; static int smb5_batt_get_prop(struct power_supply *psy, Loading Loading @@ -1288,6 +1289,9 @@ static int smb5_batt_get_prop(struct power_supply *psy, rc = smblib_get_prop_from_bms(chg, POWER_SUPPLY_PROP_CHARGE_FULL, val); break; case POWER_SUPPLY_PROP_FORCE_RECHARGE: val->intval = 0; break; default: pr_err("batt power supply prop %d not supported\n", psp); return -EINVAL; Loading Loading @@ -1367,6 +1371,15 @@ static int smb5_batt_set_prop(struct power_supply *psy, case POWER_SUPPLY_PROP_RECHARGE_SOC: rc = smblib_set_prop_rechg_soc_thresh(chg, val); break; case POWER_SUPPLY_PROP_FORCE_RECHARGE: /* toggle charging to force recharge */ vote(chg->chg_disable_votable, FORCE_RECHARGE_VOTER, true, 0); /* charge disable delay */ msleep(50); vote(chg->chg_disable_votable, FORCE_RECHARGE_VOTER, false, 0); break; default: rc = -EINVAL; } Loading
drivers/power/supply/qcom/smb5-lib.h +1 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,7 @@ enum print_reason { #define WBC_VOTER "WBC_VOTER" #define HW_LIMIT_VOTER "HW_LIMIT_VOTER" #define PL_SMB_EN_VOTER "PL_SMB_EN_VOTER" #define FORCE_RECHARGE_VOTER "FORCE_RECHARGE_VOTER" #define BOOST_BACK_STORM_COUNT 3 #define WEAK_CHG_STORM_COUNT 8 Loading