struct iio_dev — industrial I/O device
struct iio_dev { int id; int modes; int currentmode; struct device dev; struct iio_event_interface * event_interface; struct iio_buffer * buffer; struct list_head buffer_list; int scan_bytes; struct mutex mlock; const unsigned long * available_scan_masks; unsigned masklength; const unsigned long * active_scan_mask; bool scan_timestamp; unsigned scan_index_timestamp; struct iio_trigger * trig; struct iio_poll_func * pollfunc; struct iio_chan_spec const * channels; int num_channels; struct list_head channel_attr_list; struct attribute_group chan_attr_group; const char * name; const struct iio_info * info; struct mutex info_exist_lock; const struct iio_buffer_setup_ops * setup_ops; struct cdev chrdev; #define IIO_MAX_GROUPS 6 const struct attribute_group * groups[IIO_MAX_GROUPS + 1]; int groupcounter; unsigned long flags; #if defined(CONFIG_DEBUG_FS) struct dentry * debugfs_dentry; unsigned cached_reg_addr; #endif };
[INTERN] used to identify device internally
[DRIVER] operating modes supported by device
[DRIVER] current operating mode
[DRIVER] device structure, should be assigned a parent and owner
[INTERN] event chrdevs associated with interrupt lines
[DRIVER] any buffer present
[INTERN] list of all buffers currently attached
[INTERN] num bytes captured to be fed to buffer demux
[INTERN] lock used to prevent simultaneous device state changes
[DRIVER] optional array of allowed bitmasks
[INTERN] the length of the mask established from channels
[INTERN] union of all scan masks requested by buffers
[INTERN] set if any buffers have requested timestamp
[INTERN] cache of the index to the timestamp
[INTERN] current device trigger (buffer modes)
[DRIVER] function run on trigger being received
[DRIVER] channel specification structure table
[DRIVER] number of channels specified in channels
.
[INTERN] keep track of automatically created channel attributes
[INTERN] group for all attrs in base directory
[DRIVER] name of the device.
[DRIVER] callbacks and constant info from driver
[INTERN] lock to prevent use during removal
[DRIVER] callbacks to call before and after buffer enable/disable
[INTERN] associated character device
[INTERN] attribute groups
[INTERN] index of next attribute group
[INTERN] file ops related flags including busy flag.
[INTERN] device specific debugfs dentry.
[INTERN] cached register address for debugfs reads.