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

Commit c35be475 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hwmon: qpnp-adc: Remove calibration in vadc_hc_read"

parents 66706000 0af5e3fc
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@
#include <linux/power_supply.h>
#include <linux/thermal.h>

#define QPNP_VADC_HC_VREF_CODE	0x4000

/* QPNP VADC register definition */
#define QPNP_VADC_REVISION1				0x0
#define QPNP_VADC_REVISION2				0x1
@@ -558,6 +560,7 @@ int32_t qpnp_vadc_hc_read(struct qpnp_vadc_chip *vadc,
		goto fail_unlock;
	}

	if (vadc->adc->adc_prop->full_scale_code == QPNP_VADC_HC_VREF_CODE) {
		if (!vadc->vadc_init_calib) {
			rc = qpnp_vadc_calib_device(vadc);
			if (rc) {
@@ -567,6 +570,7 @@ int32_t qpnp_vadc_hc_read(struct qpnp_vadc_chip *vadc,
				vadc->vadc_init_calib = true;
			}
		}
	}

	calib_type = vadc->adc->adc_channels[dt_index].calib_type;
	if (calib_type >= ADC_HC_CAL_SEL_NONE) {