Loading drivers/power/supply/qcom/qg-soc.c +9 −1 Original line number Diff line number Diff line Loading @@ -159,6 +159,8 @@ static void get_next_update_time(struct qpnp_qg *chip) static bool is_scaling_required(struct qpnp_qg *chip) { bool input_present = is_input_present(chip); if (!chip->profile_loaded) return false; Loading @@ -175,10 +177,16 @@ static bool is_scaling_required(struct qpnp_qg *chip) return false; if (chip->catch_up_soc > chip->msoc && !is_input_present(chip)) if (chip->catch_up_soc > chip->msoc && !input_present) /* input is not present and SOC has increased */ return false; if (chip->catch_up_soc > chip->msoc && input_present && (chip->charge_status != POWER_SUPPLY_STATUS_CHARGING && chip->charge_status != POWER_SUPPLY_STATUS_FULL)) /* USB is present, but not charging */ return false; return true; } Loading drivers/power/supply/qcom/qg-util.c +1 −1 Original line number Diff line number Diff line Loading @@ -361,7 +361,7 @@ int qg_get_battery_temp(struct qpnp_qg *chip, int *temp) } pr_debug("batt_temp = %d\n", *temp); return rc; return 0; } int qg_get_battery_current(struct qpnp_qg *chip, int *ibat_ua) Loading Loading
drivers/power/supply/qcom/qg-soc.c +9 −1 Original line number Diff line number Diff line Loading @@ -159,6 +159,8 @@ static void get_next_update_time(struct qpnp_qg *chip) static bool is_scaling_required(struct qpnp_qg *chip) { bool input_present = is_input_present(chip); if (!chip->profile_loaded) return false; Loading @@ -175,10 +177,16 @@ static bool is_scaling_required(struct qpnp_qg *chip) return false; if (chip->catch_up_soc > chip->msoc && !is_input_present(chip)) if (chip->catch_up_soc > chip->msoc && !input_present) /* input is not present and SOC has increased */ return false; if (chip->catch_up_soc > chip->msoc && input_present && (chip->charge_status != POWER_SUPPLY_STATUS_CHARGING && chip->charge_status != POWER_SUPPLY_STATUS_FULL)) /* USB is present, but not charging */ return false; return true; } Loading
drivers/power/supply/qcom/qg-util.c +1 −1 Original line number Diff line number Diff line Loading @@ -361,7 +361,7 @@ int qg_get_battery_temp(struct qpnp_qg *chip, int *temp) } pr_debug("batt_temp = %d\n", *temp); return rc; return 0; } int qg_get_battery_current(struct qpnp_qg *chip, int *ibat_ua) Loading