From eab089bd20bf15aa4eb939877d90d6345c898e0b Mon Sep 17 00:00:00 2001 From: Abhijeet Dharmapurikar Date: Tue, 19 Sep 2017 18:04:15 -0700 Subject: [PATCH] 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: Abhijeet Dharmapurikar --- drivers/power/supply/qcom/smb-lib.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/power/supply/qcom/smb-lib.c b/drivers/power/supply/qcom/smb-lib.c index b3c2b67abfde..b1e9ad72a07e 100644 --- a/drivers/power/supply/qcom/smb-lib.c +++ b/drivers/power/supply/qcom/smb-lib.c @@ -2224,12 +2224,6 @@ int smblib_get_prop_usb_voltage_max(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");