Commit 2de0c019 authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Nicolas Ferre

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: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
parent acc8b8e1
...@@ -46,6 +46,25 @@ ...@@ -46,6 +46,25 @@
#define TOUCH_SAMPLE_PERIOD_US 2000 /* 2ms */ #define TOUCH_SAMPLE_PERIOD_US 2000 /* 2ms */
#define TOUCH_PEN_DETECT_DEBOUNCE_US 200 #define TOUCH_PEN_DETECT_DEBOUNCE_US 200
/**
* struct at91_adc_reg_desc - Various informations relative to registers
* @channel_base: Base offset for the channel data registers
* @drdy_mask: Mask of the DRDY field in the relevant registers
(Interruptions registers mostly)
* @status_register: Offset of the Interrupt Status Register
* @trigger_register: Offset of the Trigger setup register
* @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
* @mr_startup_mask: Mask of the STARTUP field in the adc MR register
*/
struct at91_adc_reg_desc {
u8 channel_base;
u32 drdy_mask;
u8 status_register;
u8 trigger_register;
u32 mr_prescal_mask;
u32 mr_startup_mask;
};
struct at91_adc_caps { struct at91_adc_caps {
bool has_ts; /* Support touch screen */ bool has_ts; /* Support touch screen */
bool has_tsmr; /* only at91sam9x5, sama5d3 have TSMR reg */ bool has_tsmr; /* only at91sam9x5, sama5d3 have TSMR reg */
......
...@@ -7,25 +7,6 @@ ...@@ -7,25 +7,6 @@
#ifndef _AT91_ADC_H_ #ifndef _AT91_ADC_H_
#define _AT91_ADC_H_ #define _AT91_ADC_H_
/**
* struct at91_adc_reg_desc - Various informations relative to registers
* @channel_base: Base offset for the channel data registers
* @drdy_mask: Mask of the DRDY field in the relevant registers
(Interruptions registers mostly)
* @status_register: Offset of the Interrupt Status Register
* @trigger_register: Offset of the Trigger setup register
* @mr_prescal_mask: Mask of the PRESCAL field in the adc MR register
* @mr_startup_mask: Mask of the STARTUP field in the adc MR register
*/
struct at91_adc_reg_desc {
u8 channel_base;
u32 drdy_mask;
u8 status_register;
u8 trigger_register;
u32 mr_prescal_mask;
u32 mr_startup_mask;
};
/** /**
* struct at91_adc_trigger - description of triggers * struct at91_adc_trigger - description of triggers
* @name: name of the trigger advertised to the user * @name: name of the trigger advertised to the user
...@@ -42,8 +23,6 @@ struct at91_adc_trigger { ...@@ -42,8 +23,6 @@ struct at91_adc_trigger {
/** /**
* struct at91_adc_data - platform data for ADC driver * struct at91_adc_data - platform data for ADC driver
* @channels_used: channels in use on the board as a bitmask * @channels_used: channels in use on the board as a bitmask
* @num_channels: global number of channels available on the board
* @registers: Registers definition on the board
* @startup_time: startup time of the ADC in microseconds * @startup_time: startup time of the ADC in microseconds
* @trigger_list: Triggers available in the ADC * @trigger_list: Triggers available in the ADC
* @trigger_number: Number of triggers available in the ADC * @trigger_number: Number of triggers available in the ADC
...@@ -52,8 +31,6 @@ struct at91_adc_trigger { ...@@ -52,8 +31,6 @@ struct at91_adc_trigger {
*/ */
struct at91_adc_data { struct at91_adc_data {
unsigned long channels_used; unsigned long channels_used;
u8 num_channels;
struct at91_adc_reg_desc *registers;
u8 startup_time; u8 startup_time;
struct at91_adc_trigger *trigger_list; struct at91_adc_trigger *trigger_list;
u8 trigger_number; u8 trigger_number;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment