Loading drivers/power/supply/qcom/smb-lib.c +5 −8 Original line number Diff line number Diff line Loading @@ -2398,16 +2398,9 @@ int smblib_get_prop_input_current_settled(struct smb_charger *chg, int smblib_get_prop_input_voltage_settled(struct smb_charger *chg, union power_supply_propval *val) { const struct apsd_result *apsd_result = smblib_get_apsd_result(chg); int rc, pulses; val->intval = MICRO_5V; if (apsd_result == NULL) { smblib_err(chg, "APSD result is NULL\n"); return 0; } switch (apsd_result->pst) { switch (chg->real_charger_type) { case POWER_SUPPLY_TYPE_USB_HVDCP_3: rc = smblib_get_pulse_cnt(chg, &pulses); if (rc < 0) { Loading @@ -2417,6 +2410,9 @@ int smblib_get_prop_input_voltage_settled(struct smb_charger *chg, } val->intval = MICRO_5V + HVDCP3_STEP_UV * pulses; break; case POWER_SUPPLY_TYPE_USB_PD: val->intval = chg->voltage_min_uv; break; default: val->intval = MICRO_5V; break; Loading Loading @@ -2664,6 +2660,7 @@ int smblib_set_prop_usb_voltage_min(struct smb_charger *chg, } chg->voltage_min_uv = min_uv; power_supply_changed(chg->usb_main_psy); return rc; } Loading Loading
drivers/power/supply/qcom/smb-lib.c +5 −8 Original line number Diff line number Diff line Loading @@ -2398,16 +2398,9 @@ int smblib_get_prop_input_current_settled(struct smb_charger *chg, int smblib_get_prop_input_voltage_settled(struct smb_charger *chg, union power_supply_propval *val) { const struct apsd_result *apsd_result = smblib_get_apsd_result(chg); int rc, pulses; val->intval = MICRO_5V; if (apsd_result == NULL) { smblib_err(chg, "APSD result is NULL\n"); return 0; } switch (apsd_result->pst) { switch (chg->real_charger_type) { case POWER_SUPPLY_TYPE_USB_HVDCP_3: rc = smblib_get_pulse_cnt(chg, &pulses); if (rc < 0) { Loading @@ -2417,6 +2410,9 @@ int smblib_get_prop_input_voltage_settled(struct smb_charger *chg, } val->intval = MICRO_5V + HVDCP3_STEP_UV * pulses; break; case POWER_SUPPLY_TYPE_USB_PD: val->intval = chg->voltage_min_uv; break; default: val->intval = MICRO_5V; break; Loading Loading @@ -2664,6 +2660,7 @@ int smblib_set_prop_usb_voltage_min(struct smb_charger *chg, } chg->voltage_min_uv = min_uv; power_supply_changed(chg->usb_main_psy); return rc; } Loading