aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/at91_adc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/iio/adc/at91_adc.c')
-rw-r--r--drivers/iio/adc/at91_adc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 8a0eb4a04fb5..7b40925dd4ff 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -182,7 +182,7 @@ struct at91_adc_caps {
182 u8 ts_pen_detect_sensitivity; 182 u8 ts_pen_detect_sensitivity;
183 183
184 /* startup time calculate function */ 184 /* startup time calculate function */
185 u32 (*calc_startup_ticks)(u8 startup_time, u32 adc_clk_khz); 185 u32 (*calc_startup_ticks)(u32 startup_time, u32 adc_clk_khz);
186 186
187 u8 num_channels; 187 u8 num_channels;
188 struct at91_adc_reg_desc registers; 188 struct at91_adc_reg_desc registers;
@@ -201,7 +201,7 @@ struct at91_adc_state {
201 u8 num_channels; 201 u8 num_channels;
202 void __iomem *reg_base; 202 void __iomem *reg_base;
203 struct at91_adc_reg_desc *registers; 203 struct at91_adc_reg_desc *registers;
204 u8 startup_time; 204 u32 startup_time;
205 u8 sample_hold_time; 205 u8 sample_hold_time;
206 bool sleep_mode; 206 bool sleep_mode;
207 struct iio_trigger **trig; 207 struct iio_trigger **trig;
@@ -779,7 +779,7 @@ ret:
779 return ret; 779 return ret;
780} 780}
781 781
782static u32 calc_startup_ticks_9260(u8 startup_time, u32 adc_clk_khz) 782static u32 calc_startup_ticks_9260(u32 startup_time, u32 adc_clk_khz)
783{ 783{
784 /* 784 /*
785 * Number of ticks needed to cover the startup time of the ADC 785 * Number of ticks needed to cover the startup time of the ADC
@@ -790,7 +790,7 @@ static u32 calc_startup_ticks_9260(u8 startup_time, u32 adc_clk_khz)
790 return round_up((startup_time * adc_clk_khz / 1000) - 1, 8) / 8; 790 return round_up((startup_time * adc_clk_khz / 1000) - 1, 8) / 8;
791} 791}
792 792
793static u32 calc_startup_ticks_9x5(u8 startup_time, u32 adc_clk_khz) 793static u32 calc_startup_ticks_9x5(u32 startup_time, u32 adc_clk_khz)
794{ 794{
795 /* 795 /*
796 * For sama5d3x and at91sam9x5, the formula changes to: 796 * For sama5d3x and at91sam9x5, the formula changes to: