Commit 7934fe32 authored by Jan Leupold's avatar Jan Leupold Committed by Jiri Slaby

iio: adc: at91_adc: allow to use full range of startup time

commit 2ab5f39b upstream.

The DT-Property "atmel,adc-startup-time" is stored in an u8 for a microsecond
value. When trying to increase the value of STARTUP in Register AT91_ADC_MR
some higher values can't be reached.

Change the type in function parameter and private structure field from u8 to
u32.
Signed-off-by: default avatarJan Leupold <leupold@rsi-elektrotechnik.de>
[nicolas.ferre@atmel.com: change commit message, increase u16 to u32 for startup time]
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz> [-js: only change at91_adc_state for 3.12]
parent 01f57f02
...@@ -55,7 +55,7 @@ struct at91_adc_state { ...@@ -55,7 +55,7 @@ struct at91_adc_state {
u8 num_channels; u8 num_channels;
void __iomem *reg_base; void __iomem *reg_base;
struct at91_adc_reg_desc *registers; struct at91_adc_reg_desc *registers;
u8 startup_time; u32 startup_time;
u8 sample_hold_time; u8 sample_hold_time;
bool sleep_mode; bool sleep_mode;
struct iio_trigger **trig; struct iio_trigger **trig;
......
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