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

Commit 0232e68b authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb5-lib: Report USB voltage unconditionally"

parents e1fe51b2 ab77bee9
Loading
Loading
Loading
Loading
+1 −7
Original line number Diff line number Diff line
@@ -3017,18 +3017,12 @@ int smblib_get_prop_usb_voltage_now(struct smb_charger *chg,
		return -ENODATA;
	}

	/* usb not present */
	if (!pval.intval) {
		val->intval = 0;
		return 0;
	}

	/*
	 * For PM8150B, use MID_CHG ADC channel because overvoltage is observed
	 * to occur randomly in the USBIN channel, particularly at high
	 * voltages.
	 */
	if (chg->smb_version == PM8150B_SUBTYPE)
	if (chg->smb_version == PM8150B_SUBTYPE && pval.intval)
		return smblib_read_mid_voltage_chan(chg, val);
	else
		return smblib_read_usbin_voltage_chan(chg, val);