Commit | Line | Data |
---|---|---|
aaeb6dff MR |
1 | /* |
2 | * Copyright (C) 2011 Free Electrons | |
3 | * | |
4 | * Licensed under the GPLv2 or later. | |
5 | */ | |
6 | ||
7 | #ifndef _AT91_ADC_H_ | |
8 | #define _AT91_ADC_H_ | |
9 | ||
aaeb6dff MR |
10 | /** |
11 | * struct at91_adc_trigger - description of triggers | |
12 | * @name: name of the trigger advertised to the user | |
13 | * @value: value to set in the ADC's trigger setup register | |
14 | to enable the trigger | |
15 | * @is_external: Does the trigger rely on an external pin? | |
16 | */ | |
17 | struct at91_adc_trigger { | |
18 | const char *name; | |
19 | u8 value; | |
20 | bool is_external; | |
21 | }; | |
22 | ||
23 | /** | |
24 | * struct at91_adc_data - platform data for ADC driver | |
25 | * @channels_used: channels in use on the board as a bitmask | |
aaeb6dff MR |
26 | * @startup_time: startup time of the ADC in microseconds |
27 | * @trigger_list: Triggers available in the ADC | |
28 | * @trigger_number: Number of triggers available in the ADC | |
29 | * @use_external_triggers: does the board has external triggers availables | |
30 | * @vref: Reference voltage for the ADC in millivolts | |
31 | */ | |
32 | struct at91_adc_data { | |
33 | unsigned long channels_used; | |
aaeb6dff MR |
34 | u8 startup_time; |
35 | struct at91_adc_trigger *trigger_list; | |
36 | u8 trigger_number; | |
37 | bool use_external_triggers; | |
38 | u16 vref; | |
39 | }; | |
40 | ||
41 | extern void __init at91_add_device_adc(struct at91_adc_data *data); | |
42 | #endif |