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

Commit ab8da1dd authored by Jishnu Prakash's avatar Jishnu Prakash Committed by Gerrit - the friendly Code Review server
Browse files

iio: adc: Update VADC channel configuration API



Update VADC channel configuration API by writing separately to
each configuration register.

Change-Id: If16524186fb7d4f8ab64dbc7847cb9f7c3305a0c
Signed-off-by: default avatarJishnu Prakash <jprakash@codeaurora.org>
parent 2a98f234
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -498,7 +498,23 @@ static int adc_configure(struct adc_chip *adc,
	if (!adc->poll_eoc)
		reinit_completion(&adc->complete);

	ret = adc_write(adc, ADC_USR_DIG_PARAM, buf, ADC5_MULTI_TRANSFER);
	ret = adc_write(adc, ADC_USR_DIG_PARAM, buf, 1);
	if (ret)
		return ret;

	ret = adc_write(adc, ADC_USR_FAST_AVG_CTL, &buf[1], 1);
	if (ret)
		return ret;

	ret = adc_write(adc, ADC_USR_CH_SEL_CTL, &buf[2], 1);
	if (ret)
		return ret;

	ret = adc_write(adc, ADC_USR_DELAY_CTL, &buf[3], 1);
	if (ret)
		return ret;

	ret = adc_write(adc, ADC_USR_EN_CTL1, &buf[4], 1);
	if (ret)
		return ret;