aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/at91_adc.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>2014-04-15 06:27:58 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2014-05-07 12:28:39 -0400
commit2de0c019f34ffbe49744c453628afb270aa9adb6 (patch)
tree373fb69307927a11d8eeb31d56a786336b962fdb /drivers/iio/adc/at91_adc.c
parentacc8b8e10754edf2cfd81b8ce1fe8e1438ec3f00 (diff)
iio: adc: at91: cleanup platform_data
num_channels and registers are not used anymore since they are defined inside the driver and assigned by matching the id_table. Also, struct at91_adc_reg_desc is now only used inside the driver. 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 'drivers/iio/adc/at91_adc.c')
-rw-r--r--drivers/iio/adc/at91_adc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c
index 89777ed9abd8..1beae65aef2c 100644
--- a/drivers/iio/adc/at91_adc.c
+++ b/drivers/iio/adc/at91_adc.c
@@ -46,6 +46,25 @@
46#define TOUCH_SAMPLE_PERIOD_US 2000 /* 2ms */ 46#define TOUCH_SAMPLE_PERIOD_US 2000 /* 2ms */
47#define TOUCH_PEN_DETECT_DEBOUNCE_US 200 47#define TOUCH_PEN_DETECT_DEBOUNCE_US 200
48 48
49/**
50 * struct at91_adc_reg_desc - Various informations relative to registers
51 * @channel_base: Base offset for the channel data registers
52 * @drdy_mask: Mask of the DRDY field in the relevant registers
53 (Interruptions registers mostly)
54 * @status_register: Offset of the Interrupt Status Register
55 * @trigger_register: Offset of the Trigger setup register
56 * @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
57 * @mr_startup_mask: Mask of the STARTUP field in the adc MR register
58 */
59struct at91_adc_reg_desc {
60 u8 channel_base;
61 u32 drdy_mask;
62 u8 status_register;
63 u8 trigger_register;
64 u32 mr_prescal_mask;
65 u32 mr_startup_mask;
66};
67
49struct at91_adc_caps { 68struct at91_adc_caps {
50 bool has_ts; /* Support touch screen */ 69 bool has_ts; /* Support touch screen */
51 bool has_tsmr; /* only at91sam9x5, sama5d3 have TSMR reg */ 70 bool has_tsmr; /* only at91sam9x5, sama5d3 have TSMR reg */