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

Commit 1bd51b78 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar Committed by Anirudh Ghayal
Browse files

smb-lib: allow reading vbus without presence



Currently the driver skips invoking adc api's if usb is not
present i.e. vbus has fallen below 3.3V.

This presence check is not required for the vbus. Skip that
check.

Change-Id: I4a2dd91109a308b553b7407618ee8f3221127f61
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 67cc5e6b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -2169,12 +2169,6 @@ int smblib_get_prop_usb_online(struct smb_charger *chg,
int smblib_get_prop_usb_voltage_now(struct smb_charger *chg,
				    union power_supply_propval *val)
{
	int rc = 0;

	rc = smblib_get_prop_usb_present(chg, val);
	if (rc < 0 || !val->intval)
		return rc;

	if (!chg->iio.usbin_v_chan ||
		PTR_ERR(chg->iio.usbin_v_chan) == -EPROBE_DEFER)
		chg->iio.usbin_v_chan = iio_channel_get(chg->dev, "usbin_v");