aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2014-04-15 06:27:59 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-05-07 12:28:40 -0400
commit84882b060301c35ab7e2c1ef355b0bd06b764195 (patch)
treea1d306946864a711f4cb7316ad49f7ef5c37e92e /include/linux/platform_data
parent2de0c019f34ffbe49744c453628afb270aa9adb6 (diff)
iio: adc: at91_adc: Add support for touchscreens without TSMR
Old ADCs, as present on the sam9rl and the sam9g45 don't have a TSMR register and the touchscreen support should be handled differently. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'include/linux/platform_data')
-rw-r--r--include/linux/platform_data/at91_adc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/platform_data/at91_adc.h b/include/linux/platform_data/at91_adc.h
index fcf73879dbfe..7819fc787731 100644
--- a/include/linux/platform_data/at91_adc.h
+++ b/include/linux/platform_data/at91_adc.h
@@ -7,6 +7,12 @@
7#ifndef _AT91_ADC_H_ 7#ifndef _AT91_ADC_H_
8#define _AT91_ADC_H_ 8#define _AT91_ADC_H_
9 9
10enum atmel_adc_ts_type {
11 ATMEL_ADC_TOUCHSCREEN_NONE = 0,
12 ATMEL_ADC_TOUCHSCREEN_4WIRE = 4,
13 ATMEL_ADC_TOUCHSCREEN_5WIRE = 5,
14};
15
10/** 16/**
11 * struct at91_adc_trigger - description of triggers 17 * struct at91_adc_trigger - description of triggers
12 * @name: name of the trigger advertised to the user 18 * @name: name of the trigger advertised to the user
@@ -28,6 +34,7 @@ struct at91_adc_trigger {
28 * @trigger_number: Number of triggers available in the ADC 34 * @trigger_number: Number of triggers available in the ADC
29 * @use_external_triggers: does the board has external triggers availables 35 * @use_external_triggers: does the board has external triggers availables
30 * @vref: Reference voltage for the ADC in millivolts 36 * @vref: Reference voltage for the ADC in millivolts
37 * @touchscreen_type: If a touchscreen is connected, its type (4 or 5 wires)
31 */ 38 */
32struct at91_adc_data { 39struct at91_adc_data {
33 unsigned long channels_used; 40 unsigned long channels_used;
@@ -36,6 +43,7 @@ struct at91_adc_data {
36 u8 trigger_number; 43 u8 trigger_number;
37 bool use_external_triggers; 44 bool use_external_triggers;
38 u16 vref; 45 u16 vref;
46 enum atmel_adc_ts_type touchscreen_type;
39}; 47};
40 48
41extern void __init at91_add_device_adc(struct at91_adc_data *data); 49extern void __init at91_add_device_adc(struct at91_adc_data *data);