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

TOMOYO Linux Cross Reference
Linux/include/linux/iio/events.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-only */
  2 /* The industrial I/O - event passing to userspace
  3  *
  4  * Copyright (c) 2008-2011 Jonathan Cameron
  5  */
  6 #ifndef _IIO_EVENTS_H_
  7 #define _IIO_EVENTS_H_
  8 
  9 #include <linux/iio/types.h>
 10 #include <uapi/linux/iio/events.h>
 11 
 12 /**
 13  * IIO_EVENT_CODE() - create event identifier
 14  * @chan_type:  Type of the channel. Should be one of enum iio_chan_type.
 15  * @diff:       Whether the event is for an differential channel or not.
 16  * @modifier:   Modifier for the channel. Should be one of enum iio_modifier.
 17  * @direction:  Direction of the event. One of enum iio_event_direction.
 18  * @type:       Type of the event. Should be one of enum iio_event_type.
 19  * @chan:       Channel number for non-differential channels.
 20  * @chan1:      First channel number for differential channels.
 21  * @chan2:      Second channel number for differential channels.
 22  */
 23 
 24 #define IIO_EVENT_CODE(chan_type, diff, modifier, direction,            \
 25                        type, chan, chan1, chan2)                        \
 26         (((u64)type << 56) | ((u64)diff << 55) |                        \
 27          ((u64)direction << 48) | ((u64)modifier << 40) |               \
 28          ((u64)chan_type << 32) | (((u16)chan2) << 16) | ((u16)chan1) | \
 29          ((u16)chan))
 30 
 31 
 32 /**
 33  * IIO_MOD_EVENT_CODE() - create event identifier for modified channels
 34  * @chan_type:  Type of the channel. Should be one of enum iio_chan_type.
 35  * @number:     Channel number.
 36  * @modifier:   Modifier for the channel. Should be one of enum iio_modifier.
 37  * @type:       Type of the event. Should be one of enum iio_event_type.
 38  * @direction:  Direction of the event. One of enum iio_event_direction.
 39  */
 40 
 41 #define IIO_MOD_EVENT_CODE(chan_type, number, modifier,         \
 42                            type, direction)                             \
 43         IIO_EVENT_CODE(chan_type, 0, modifier, direction, type, number, 0, 0)
 44 
 45 /**
 46  * IIO_UNMOD_EVENT_CODE() - create event identifier for unmodified channels
 47  * @chan_type:  Type of the channel. Should be one of enum iio_chan_type.
 48  * @number:     Channel number.
 49  * @type:       Type of the event. Should be one of enum iio_event_type.
 50  * @direction:  Direction of the event. One of enum iio_event_direction.
 51  */
 52 
 53 #define IIO_UNMOD_EVENT_CODE(chan_type, number, type, direction)        \
 54         IIO_EVENT_CODE(chan_type, 0, 0, direction, type, number, 0, 0)
 55 
 56 #endif
 57 

~ [ 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