s390/Kconfig: sort config S390 select list once again
[linux-2.6-microblaze.git] / include / linux / iio / iio-opaque.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2
3 #ifndef _INDUSTRIAL_IO_OPAQUE_H_
4 #define _INDUSTRIAL_IO_OPAQUE_H_
5
6 /**
7  * struct iio_dev_opaque - industrial I/O device opaque information
8  * @indio_dev:                  public industrial I/O device information
9  * @event_interface:            event chrdevs associated with interrupt lines
10  * @buffer_list:                list of all buffers currently attached
11  * @channel_attr_list:          keep track of automatically created channel
12  *                              attributes
13  * @chan_attr_group:            group for all attrs in base directory
14  * @ioctl_handlers:             ioctl handlers registered with the core handler
15  * @debugfs_dentry:             device specific debugfs dentry
16  * @cached_reg_addr:            cached register address for debugfs reads
17  * @read_buf:                   read buffer to be used for the initial reg read
18  * @read_buf_len:               data length in @read_buf
19  */
20 struct iio_dev_opaque {
21         struct iio_dev                  indio_dev;
22         struct iio_event_interface      *event_interface;
23         struct list_head                buffer_list;
24         struct list_head                channel_attr_list;
25         struct attribute_group          chan_attr_group;
26         struct list_head                ioctl_handlers;
27 #if defined(CONFIG_DEBUG_FS)
28         struct dentry                   *debugfs_dentry;
29         unsigned                        cached_reg_addr;
30         char                            read_buf[20];
31         unsigned int                    read_buf_len;
32 #endif
33 };
34
35 #define to_iio_dev_opaque(indio_dev)            \
36         container_of(indio_dev, struct iio_dev_opaque, indio_dev)
37
38 #endif