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

Commit 0d46248c authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "iio: qcom-spmi-adc5: Add support for calibrated bat_therm channel"

parents abb255af 9b947ab1
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1037,6 +1037,8 @@ static const struct adc5_channels adc7_chans_pmic[ADC5_MAX_CHANNEL] = {
					SCALE_HW_CALIB_THERM_100K_PU_PM7)
	[ADC7_GPIO4_100K_PU]	= ADC5_CHAN_TEMP("gpio4_pu2", 0,
					SCALE_HW_CALIB_THERM_100K_PU_PM7)
	[ADC7_V_I_BAT_THERM]	= ADC5_CHAN_TEMP("bat_therm_calib_100k_pu",
					0, SCALE_HW_CALIB_PM5_GEN3_BATT_THERM_100K)
};

static const struct adc5_channels adc5_chans_rev2[ADC5_MAX_CHANNEL] = {
@@ -1094,7 +1096,7 @@ static int adc5_get_dt_channel_data(struct adc5_chip *adc,
		chan = (chan & ADC_CHANNEL_MASK);
	}

	if (chan > ADC5_PARALLEL_ISENSE_VBAT_IDATA ||
	if (chan > ADC5_MAX_CHANNEL ||
	    !data->adc_chans[chan].datasheet_name) {
		dev_err(dev, "%s invalid channel number %d\n", name, chan);
		return -EINVAL;