staging:iio:max1363 - move to channel_spec registration.
V3: move to single chan registration macro. Also introduce some local macros to greatly reduce code length when setting up the chan_spec arrays for all the different devices. V2: update read_raw for two value approach. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
f3736416e8
commit
298cd976e0
|
@ -152,24 +152,24 @@ enum max1363_modes {
|
|||
/**
|
||||
* struct max1363_chip_info - chip specifc information
|
||||
* @name: indentification string for chip
|
||||
* @num_inputs: number of physical inputs on chip
|
||||
* @bits: accuracy of the adc in bits
|
||||
* @int_vref_mv: the internal reference voltage
|
||||
* @monitor_mode: whether the chip supports monitor interrupts
|
||||
* @mode_list: array of available scan modes
|
||||
* @num_modes: the number of scan modes available
|
||||
* @default_mode: the scan mode in which the chip starts up
|
||||
* @channel: channel specification
|
||||
* @num_channels: number of channels
|
||||
*/
|
||||
struct max1363_chip_info {
|
||||
u8 num_inputs;
|
||||
u8 bits;
|
||||
u16 int_vref_mv;
|
||||
bool monitor_mode;
|
||||
const enum max1363_modes *mode_list;
|
||||
int num_modes;
|
||||
enum max1363_modes default_mode;
|
||||
struct attribute_group *dev_attrs;
|
||||
struct attribute_group *scan_attrs;
|
||||
struct iio_chan_spec *channels;
|
||||
int num_channels;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -199,7 +199,6 @@ int max1363_register_ring_funcs_and_init(struct iio_dev *indio_dev)
|
|||
goto error_deallocate_sw_rb;
|
||||
|
||||
/* Ring buffer functions - here trigger setup related */
|
||||
indio_dev->ring->scan_el_attrs = st->chip_info->scan_attrs;
|
||||
indio_dev->ring->postenable = &iio_triggered_ring_postenable;
|
||||
indio_dev->ring->preenable = &max1363_ring_preenable;
|
||||
indio_dev->ring->predisable = &iio_triggered_ring_predisable;
|
||||
|
|
Loading…
Reference in New Issue