~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/iio/iio-opaque.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  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  * @id:                 used to identify device internally
 10  * @currentmode:                operating mode currently in use, may be eventually
 11  *                              checked by device drivers but should be considered
 12  *                              read-only as this is a core internal bit
 13  * @driver_module:              used to make it harder to undercut users
 14  * @mlock:                      lock used to prevent simultaneous device state changes
 15  * @mlock_key:                  lockdep class for iio_dev lock
 16  * @info_exist_lock:            lock to prevent use during removal
 17  * @trig_readonly:              mark the current trigger immutable
 18  * @event_interface:            event chrdevs associated with interrupt lines
 19  * @attached_buffers:           array of buffers statically attached by the driver
 20  * @attached_buffers_cnt:       number of buffers in the array of statically attached buffers
 21  * @buffer_ioctl_handler:       ioctl() handler for this IIO device's buffer interface
 22  * @buffer_list:                list of all buffers currently attached
 23  * @channel_attr_list:          keep track of automatically created channel
 24  *                              attributes
 25  * @chan_attr_group:            group for all attrs in base directory
 26  * @ioctl_handlers:             ioctl handlers registered with the core handler
 27  * @groups:                     attribute groups
 28  * @groupcounter:               index of next attribute group
 29  * @legacy_scan_el_group:       attribute group for legacy scan elements attribute group
 30  * @legacy_buffer_group:        attribute group for legacy buffer attributes group
 31  * @bounce_buffer:              for devices that call iio_push_to_buffers_with_timestamp_unaligned()
 32  * @bounce_buffer_size:         size of currently allocate bounce buffer
 33  * @scan_index_timestamp:       cache of the index to the timestamp
 34  * @clock_id:                   timestamping clock posix identifier
 35  * @chrdev:                     associated character device
 36  * @flags:                      file ops related flags including busy flag.
 37  * @debugfs_dentry:             device specific debugfs dentry
 38  * @cached_reg_addr:            cached register address for debugfs reads
 39  * @read_buf:                   read buffer to be used for the initial reg read
 40  * @read_buf_len:               data length in @read_buf
 41  */
 42 struct iio_dev_opaque {
 43         struct iio_dev                  indio_dev;
 44         int                             currentmode;
 45         int                             id;
 46         struct module                   *driver_module;
 47         struct mutex                    mlock;
 48         struct lock_class_key           mlock_key;
 49         struct mutex                    info_exist_lock;
 50         bool                            trig_readonly;
 51         struct iio_event_interface      *event_interface;
 52         struct iio_buffer               **attached_buffers;
 53         unsigned int                    attached_buffers_cnt;
 54         struct iio_ioctl_handler        *buffer_ioctl_handler;
 55         struct list_head                buffer_list;
 56         struct list_head                channel_attr_list;
 57         struct attribute_group          chan_attr_group;
 58         struct list_head                ioctl_handlers;
 59         const struct attribute_group    **groups;
 60         int                             groupcounter;
 61         struct attribute_group          legacy_scan_el_group;
 62         struct attribute_group          legacy_buffer_group;
 63         void                            *bounce_buffer;
 64         size_t                          bounce_buffer_size;
 65 
 66         unsigned int                    scan_index_timestamp;
 67         clockid_t                       clock_id;
 68         struct cdev                     chrdev;
 69         unsigned long                   flags;
 70 
 71 #if defined(CONFIG_DEBUG_FS)
 72         struct dentry                   *debugfs_dentry;
 73         unsigned                        cached_reg_addr;
 74         char                            read_buf[20];
 75         unsigned int                    read_buf_len;
 76 #endif
 77 };
 78 
 79 #define to_iio_dev_opaque(_indio_dev)           \
 80         container_of((_indio_dev), struct iio_dev_opaque, indio_dev)
 81 
 82 #endif
 83 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php