]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - include/linux/platform_data/at91_adc.h
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
17 * @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
18 * @mr_startup_mask: Mask of the STARTUP field in the adc MR register
20 struct at91_adc_reg_desc
{
30 * struct at91_adc_trigger - description of triggers
31 * @name: name of the trigger advertised to the user
32 * @value: value to set in the ADC's trigger setup register
34 * @is_external: Does the trigger rely on an external pin?
36 struct at91_adc_trigger
{
43 * struct at91_adc_data - platform data for ADC driver
44 * @channels_used: channels in use on the board as a bitmask
45 * @num_channels: global number of channels available on the board
46 * @registers: Registers definition on the board
47 * @startup_time: startup time of the ADC in microseconds
48 * @trigger_list: Triggers available in the ADC
49 * @trigger_number: Number of triggers available in the ADC
50 * @use_external_triggers: does the board has external triggers availables
51 * @vref: Reference voltage for the ADC in millivolts
53 struct at91_adc_data
{
54 unsigned long channels_used
;
56 struct at91_adc_reg_desc
*registers
;
58 struct at91_adc_trigger
*trigger_list
;
60 bool use_external_triggers
;
64 extern void __init
at91_add_device_adc(struct at91_adc_data
*data
);