Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268172
b: refs/heads/master
c: 8ce7375
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 549f21e commit 9da0f63
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 66dbe70437b561c241d1117dd291c11db21072fd
refs/heads/master: 8ce7375be7036d6e536b6341ec83e5db849cda6e
4 changes: 3 additions & 1 deletion trunk/drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,9 @@ static void iio_device_unregister_sysfs(struct iio_dev *dev_info)
static const char * const iio_ev_type_text[] = {
[IIO_EV_TYPE_THRESH] = "thresh",
[IIO_EV_TYPE_MAG] = "mag",
[IIO_EV_TYPE_ROC] = "roc"
[IIO_EV_TYPE_ROC] = "roc",
[IIO_EV_TYPE_THRESH_ADAPTIVE] = "thresh_adaptive",
[IIO_EV_TYPE_MAG_ADAPTIVE] = "mag_adaptive",
};

static const char * const iio_ev_dir_text[] = {
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/staging/iio/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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.
Expand Down

0 comments on commit 9da0f63

Please sign in to comment.