|
10 | 10 | #include <uapi/linux/iio/events.h>
|
11 | 11 |
|
12 | 12 | /**
|
13 |
| - * IIO_EVENT_CODE() - create event identifier |
| 13 | + * _IIO_EVENT_CODE() - create event identifier |
14 | 14 | * @chan_type: Type of the channel. Should be one of enum iio_chan_type.
|
15 | 15 | * @diff: Whether the event is for an differential channel or not.
|
16 | 16 | * @modifier: Modifier for the channel. Should be one of enum iio_modifier.
|
|
19 | 19 | * @chan: Channel number for non-differential channels.
|
20 | 20 | * @chan1: First channel number for differential channels.
|
21 | 21 | * @chan2: Second channel number for differential channels.
|
| 22 | + * |
| 23 | + * Drivers should use the specialized macros below instead of using this one |
| 24 | + * directly. |
22 | 25 | */
|
23 | 26 |
|
24 |
| -#define IIO_EVENT_CODE(chan_type, diff, modifier, direction, \ |
25 |
| - type, chan, chan1, chan2) \ |
| 27 | +#define _IIO_EVENT_CODE(chan_type, diff, modifier, direction, \ |
| 28 | + type, chan, chan1, chan2) \ |
26 | 29 | (((u64)type << 56) | ((u64)diff << 55) | \
|
27 | 30 | ((u64)direction << 48) | ((u64)modifier << 40) | \
|
28 | 31 | ((u64)chan_type << 32) | (((u16)chan2) << 16) | ((u16)chan1) | \
|
|
41 | 44 |
|
42 | 45 | #define IIO_MOD_EVENT_CODE(chan_type, number, modifier, \
|
43 | 46 | type, direction) \
|
44 |
| - IIO_EVENT_CODE(chan_type, 0, modifier, direction, type, number, 0, 0) |
| 47 | + _IIO_EVENT_CODE(chan_type, 0, modifier, direction, type, number, 0, 0) |
45 | 48 |
|
46 | 49 | /**
|
47 | 50 | * IIO_UNMOD_EVENT_CODE() - create event identifier for unmodified (non
|
|
53 | 56 | */
|
54 | 57 |
|
55 | 58 | #define IIO_UNMOD_EVENT_CODE(chan_type, number, type, direction) \
|
56 |
| - IIO_EVENT_CODE(chan_type, 0, 0, direction, type, number, 0, 0) |
| 59 | + _IIO_EVENT_CODE(chan_type, 0, 0, direction, type, number, 0, 0) |
57 | 60 |
|
58 | 61 | /**
|
59 | 62 | * IIO_DIFF_EVENT_CODE() - create event identifier for differential channels
|
|
65 | 68 | */
|
66 | 69 |
|
67 | 70 | #define IIO_DIFF_EVENT_CODE(chan_type, chan1, chan2, type, direction) \
|
68 |
| - IIO_EVENT_CODE(chan_type, 1, 0, direction, type, 0, chan1, chan2) |
| 71 | + _IIO_EVENT_CODE(chan_type, 1, 0, direction, type, 0, chan1, chan2) |
69 | 72 |
|
70 | 73 | #endif
|
0 commit comments