Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9100f781 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5: Set WLS VOUT to 5V upon attach at End of Charge"

parents 1933afc2 bee0f676
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -6298,7 +6298,7 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)
	union power_supply_propval pval;
	int input_present;
	bool dcin_present, vbus_present;
	int rc, wireless_vout = 0;
	int rc, wireless_vout = 0, wls_set = 0;
	int sec_charger;

	rc = smblib_get_prop_vph_voltage_now(chg, &pval);
@@ -6348,7 +6348,15 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)
				vote(chg->fcc_main_votable,
					WLS_PL_CHARGING_VOTER, true, 800000);

			pval.intval = wireless_vout;
			rc = smblib_get_prop_batt_status(chg, &pval);
			if (rc < 0)
				smblib_err(chg, "Couldn't read batt status rc=%d\n",
						rc);

			wls_set = (pval.intval == POWER_SUPPLY_STATUS_FULL) ?
				MICRO_5V : wireless_vout;

			pval.intval = wls_set;
			rc = smblib_set_prop_voltage_wls_output(chg, &pval);
			if (rc < 0)
				dev_err(chg->dev, "Couldn't set dc voltage to 2*vph  rc=%d\n",