Commit f29b212e authored by Naidu Tellapati's avatar Naidu Tellapati Committed by Jonathan Cameron

iio: adc: cc10001: Add delay before setting START bit

According to hardware team there should be some delay after
setting channel number, start mode and before setting START.
Add a one microsecond delay for this purpose.

Fixes: 1664f6a5 ("iio: adc: Cosmic Circuits 10001 ADC driver")
Signed-off-by: default avatarNaidu Tellapati <naidu.tellapati@imgtec.com>
Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@imgtec.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 65a761bf
......@@ -100,6 +100,7 @@ static void cc10001_adc_start(struct cc10001_adc_device *adc_dev,
val = (channel & CC10001_ADC_CH_MASK) | CC10001_ADC_MODE_SINGLE_CONV;
cc10001_adc_write_reg(adc_dev, CC10001_ADC_CONFIG, val);
udelay(1);
val = cc10001_adc_read_reg(adc_dev, CC10001_ADC_CONFIG);
val = val | CC10001_ADC_START_CONV;
cc10001_adc_write_reg(adc_dev, CC10001_ADC_CONFIG, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment