summaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/sysfs.h
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-09-02 17:14:44 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-09-06 16:02:03 -0700
commit8ce7375be7036d6e536b6341ec83e5db849cda6e (patch)
treea58e2cacb76d7ce4a65b88f69f04627d861fda17 /drivers/staging/iio/sysfs.h
parent66dbe70437b561c241d1117dd291c11db21072fd (diff)
downloadop-kernel-dev-8ce7375be7036d6e536b6341ec83e5db849cda6e.zip
op-kernel-dev-8ce7375be7036d6e536b6341ec83e5db849cda6e.tar.gz
staging:iio:add adaptive event types and missing extract_type macro.
I'm not entirely sure this is the right way to go. Suggestions of other options welcome! Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/sysfs.h')
-rw-r--r--drivers/staging/iio/sysfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/iio/sysfs.h b/drivers/staging/iio/sysfs.h
index 9224f30..3388b8c 100644
--- a/drivers/staging/iio/sysfs.h
+++ b/drivers/staging/iio/sysfs.h
@@ -118,6 +118,8 @@ enum iio_event_type {
IIO_EV_TYPE_THRESH,
IIO_EV_TYPE_MAG,
IIO_EV_TYPE_ROC,
+ IIO_EV_TYPE_THRESH_ADAPTIVE,
+ IIO_EV_TYPE_MAG_ADAPTIVE,
};
enum iio_event_direction {
@@ -142,6 +144,7 @@ enum iio_event_direction {
#define IIO_UNMOD_EVENT_CODE(channelclass, number, type, direction) \
IIO_EVENT_CODE(channelclass, 0, direction, type, number, 0, 0)
+#define IIO_EVENT_CODE_EXTRACT_TYPE(mask) ((mask >> 56) & 0xFF)
#define IIO_EVENT_CODE_EXTRACT_DIR(mask) ((mask >> 48) & 0xFF)
/* Event code number extraction depends on which type of event we have.
OpenPOWER on IntegriCloud