]> git.karo-electronics.de Git - karo-tx-linux.git/commit
iio: adc: at91_adc: correct default shtim value
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Mon, 3 Mar 2014 18:07:00 +0000 (18:07 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 15 Mar 2014 16:32:44 +0000 (16:32 +0000)
commit8f32b6ba56ef8c8434635b9f08ff6a23510960a5
tree78c32af0f5b53021173824512be68f77fd6ebb9d
parent301841a634976c1cef4490cae577ffd0f26d0149
iio: adc: at91_adc: correct default shtim value

When sample_hold_time is zero (this is the case when DT is not used or if
atmel,adc-sample-hold-time is omitted), then the calculated shtim is large.

Make that 0, which is the default for that register and the ADC will then use a
sane value of 2/ADCCLK or 1/ADCCLK depending on the version.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/adc/at91_adc.c