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

Commit b4281cbd authored by Ashay Jaiswal's avatar Ashay Jaiswal Committed by Gerrit - the friendly Code Review server
Browse files

power: smb5: always parse USBIN_V channel



Current software design only parses USBIN_V channel if USBIN_MID
channel is not present, modify this to parse USBIN_V always.
USBIN_V channel is used to read VBUS voltage in host mode.

Change-Id: I805a43769f371e6a39325700cacd233837dcecdc
Signed-off-by: default avatarAshay Jaiswal <ashayj@codeaurora.org>
parent 0612641d
Loading
Loading
Loading
Loading
+4 −11
Original line number Diff line number Diff line
@@ -564,18 +564,11 @@ static int smb5_parse_dt(struct smb5 *chip)
	if (rc < 0)
		return rc;

	if (!chg->iio.mid_chan) {
	rc = smblib_get_iio_channel(chg, "usb_in_voltage",
					&chg->iio.usbin_v_chan);
	if (rc < 0)
		return rc;

		if (!chg->iio.usbin_v_chan) {
			dev_err(chg->dev, "No voltage channel defined");
			return -EINVAL;
		}
	}

	rc = smblib_get_iio_channel(chg, "chg_temp", &chg->iio.temp_chan);
	if (rc < 0)
		return rc;