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

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

Merge "power: smb5-lib: Set default WLS VOUT to 5 V when standalone"

parents ca2a7aef 734ca0f9
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -5765,8 +5765,8 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)
	dcin_present = input_present & INPUT_PRESENT_DC;
	vbus_present = input_present & INPUT_PRESENT_USB;

	if (dcin_present) {
		if (!vbus_present && chg->sec_cp_present) {
	if (dcin_present && !vbus_present) {
		if (chg->sec_cp_present) {
			pval.intval = wireless_vout;
			rc = smblib_set_prop_voltage_wls_output(chg, &pval);
			if (rc < 0)
@@ -5779,6 +5779,16 @@ irqreturn_t dc_plugin_irq_handler(int irq, void *data)
			if (rc < 0)
				dev_err(chg->dev, "Couldn't enable secondary chargers  rc=%d\n",
					rc);
		} else {
			/*
			 * If no secondary charger is present, commence
			 * wireless charging at 5 V by default.
			 */
			pval.intval = 5000000;
			rc = smblib_set_prop_voltage_wls_output(chg, &pval);
			if (rc < 0)
				dev_err(chg->dev, "Couldn't set dc voltage to 5 V rc=%d\n",
					rc);
		}
	} else {
		if (chg->cp_reason == POWER_SUPPLY_CP_WIRELESS) {