2 * Copyright (C) 2011 Free Electrons
4 * Licensed under the GPLv2 or later.
11 * struct at91_adc_reg_desc - Various informations relative to registers
12 * @channel_base: Base offset for the channel data registers
13 * @drdy_mask: Mask of the DRDY field in the relevant registers
14 (Interruptions registers mostly)
15 * @status_register: Offset of the Interrupt Status Register
16 * @trigger_register: Offset of the Trigger setup register
18 struct at91_adc_reg_desc
{
26 * struct at91_adc_trigger - description of triggers
27 * @name: name of the trigger advertised to the user
28 * @value: value to set in the ADC's trigger setup register
30 * @is_external: Does the trigger rely on an external pin?
32 struct at91_adc_trigger
{
39 * struct at91_adc_data - platform data for ADC driver
40 * @channels_used: channels in use on the board as a bitmask
41 * @num_channels: global number of channels available on the board
42 * @registers: Registers definition on the board
43 * @startup_time: startup time of the ADC in microseconds
44 * @trigger_list: Triggers available in the ADC
45 * @trigger_number: Number of triggers available in the ADC
46 * @use_external_triggers: does the board has external triggers availables
47 * @vref: Reference voltage for the ADC in millivolts
49 struct at91_adc_data
{
50 unsigned long channels_used
;
52 struct at91_adc_reg_desc
*registers
;
54 struct at91_adc_trigger
*trigger_list
;
56 bool use_external_triggers
;
60 extern void __init
at91_add_device_adc(struct at91_adc_data
*data
);