Lars-Peter Clausen <lars@xxxxxxxxxx> wrote: >Add macros for extracting whether the event is for a differential >channel and >the second channel number from the event code. These were the only two >fields >which did not have such an macro yet. > >Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx> Acked-by: Jonathan Cameron <jic23@xxxxxxxxxx> >--- > drivers/staging/iio/events.h | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > >diff --git a/drivers/staging/iio/events.h >b/drivers/staging/iio/events.h >index 416800e..c25f0e3 100644 >--- a/drivers/staging/iio/events.h >+++ b/drivers/staging/iio/events.h >@@ -97,7 +97,9 @@ enum iio_event_direction { >/* Event code number extraction depends on which type of event we have. > * Perhaps review this function in the future*/ > #define IIO_EVENT_CODE_EXTRACT_CHAN(mask) ((__s16)(mask & 0xFFFF)) >+#define IIO_EVENT_CODE_EXTRACT_CHAN2(mask) ((__s16)(((mask) >> 16) & >0xFFFF)) > > #define IIO_EVENT_CODE_EXTRACT_MODIFIER(mask) ((mask >> 40) & 0xFF) >+#define IIO_EVENT_CODE_EXTRACT_DIFF(mask) (((mask) >> 55) & 0x1) > > #endif >-- >1.7.7.3 -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html