diff options
author | Naidu Tellapati <naidu.tellapati@imgtec.com> | 2015-05-07 17:22:20 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-12 15:01:13 -0400 |
commit | f29b212edb9e253cafcb4a2ab7842a890989f1a5 (patch) | |
tree | 7bd4b5e971fab715aa243bff5eb648dbb6f9fe29 /drivers/iio | |
parent | 65a761bf8d55fdcf8ecc4642382a4e76c086e44c (diff) |
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: 1664f6a5b0c8 ("iio: adc: Cosmic Circuits 10001 ADC driver")
Signed-off-by: Naidu Tellapati <naidu.tellapati@imgtec.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/cc10001_adc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/adc/cc10001_adc.c b/drivers/iio/adc/cc10001_adc.c index fb7c5d2cc61a..115f6e99a7fa 100644 --- a/drivers/iio/adc/cc10001_adc.c +++ b/drivers/iio/adc/cc10001_adc.c | |||
@@ -100,6 +100,7 @@ static void cc10001_adc_start(struct cc10001_adc_device *adc_dev, | |||
100 | val = (channel & CC10001_ADC_CH_MASK) | CC10001_ADC_MODE_SINGLE_CONV; | 100 | val = (channel & CC10001_ADC_CH_MASK) | CC10001_ADC_MODE_SINGLE_CONV; |
101 | cc10001_adc_write_reg(adc_dev, CC10001_ADC_CONFIG, val); | 101 | cc10001_adc_write_reg(adc_dev, CC10001_ADC_CONFIG, val); |
102 | 102 | ||
103 | udelay(1); | ||
103 | val = cc10001_adc_read_reg(adc_dev, CC10001_ADC_CONFIG); | 104 | val = cc10001_adc_read_reg(adc_dev, CC10001_ADC_CONFIG); |
104 | val = val | CC10001_ADC_START_CONV; | 105 | val = val | CC10001_ADC_START_CONV; |
105 | cc10001_adc_write_reg(adc_dev, CC10001_ADC_CONFIG, val); | 106 | cc10001_adc_write_reg(adc_dev, CC10001_ADC_CONFIG, val); |