iio: adc: at91_adc: remove platform data and move defs in driver file
The AT91 ADC driver no longer uses the 'at91_add_device_adc' platform data type. This is no longer used (at least in mainline boards). This change removes the platform-data initialization from the driver, since it is mostly dead code now. Some definitions [from the platform data at91_adc.h include] have been moved in the driver, since they are needed in the driver. Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20200930135048.11530-5-alexandru.ardelean@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
f091d7c5fe
commit
ead1c9f376
2 changed files with 22 additions and 87 deletions
|
|
@ -1,49 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
/*
|
||||
* Copyright (C) 2011 Free Electrons
|
||||
*/
|
||||
|
||||
#ifndef _AT91_ADC_H_
|
||||
#define _AT91_ADC_H_
|
||||
|
||||
enum atmel_adc_ts_type {
|
||||
ATMEL_ADC_TOUCHSCREEN_NONE = 0,
|
||||
ATMEL_ADC_TOUCHSCREEN_4WIRE = 4,
|
||||
ATMEL_ADC_TOUCHSCREEN_5WIRE = 5,
|
||||
};
|
||||
|
||||
/**
|
||||
* struct at91_adc_trigger - description of triggers
|
||||
* @name: name of the trigger advertised to the user
|
||||
* @value: value to set in the ADC's trigger setup register
|
||||
to enable the trigger
|
||||
* @is_external: Does the trigger rely on an external pin?
|
||||
*/
|
||||
struct at91_adc_trigger {
|
||||
const char *name;
|
||||
u8 value;
|
||||
bool is_external;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct at91_adc_data - platform data for ADC driver
|
||||
* @channels_used: channels in use on the board as a bitmask
|
||||
* @startup_time: startup time of the ADC in microseconds
|
||||
* @trigger_list: Triggers available in the ADC
|
||||
* @trigger_number: Number of triggers available in the ADC
|
||||
* @use_external_triggers: does the board has external triggers availables
|
||||
* @vref: Reference voltage for the ADC in millivolts
|
||||
* @touchscreen_type: If a touchscreen is connected, its type (4 or 5 wires)
|
||||
*/
|
||||
struct at91_adc_data {
|
||||
unsigned long channels_used;
|
||||
u8 startup_time;
|
||||
struct at91_adc_trigger *trigger_list;
|
||||
u8 trigger_number;
|
||||
bool use_external_triggers;
|
||||
u16 vref;
|
||||
enum atmel_adc_ts_type touchscreen_type;
|
||||
};
|
||||
|
||||
extern void __init at91_add_device_adc(struct at91_adc_data *data);
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue