diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-05-18 14:42:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-19 16:15:01 -0700 |
commit | d1ab8552cda68dd100cf113cba7bc37e653ad886 (patch) | |
tree | ae8c69d911fb3f39e15bba9de8fcad137f483bae /drivers | |
parent | e7a2c3238345c88a668c26ec6790f19f4fa7a820 (diff) | |
download | kernel_samsung_aries-d1ab8552cda68dd100cf113cba7bc37e653ad886.zip kernel_samsung_aries-d1ab8552cda68dd100cf113cba7bc37e653ad886.tar.gz kernel_samsung_aries-d1ab8552cda68dd100cf113cba7bc37e653ad886.tar.bz2 |
staging:iio:adc:adt7410 replace abuse of buffer events.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/adc/adt7410.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/staging/iio/adc/adt7410.c b/drivers/staging/iio/adc/adt7410.c index c102b42..85b5c1a 100644 --- a/drivers/staging/iio/adc/adt7410.c +++ b/drivers/staging/iio/adc/adt7410.c @@ -355,14 +355,6 @@ static const struct attribute_group adt7410_attribute_group = { .attrs = adt7410_attributes, }; -/* - * temperature bound events - */ - -#define IIO_EVENT_CODE_ADT7410_ABOVE_ALARM IIO_BUFFER_EVENT_CODE(0) -#define IIO_EVENT_CODE_ADT7410_BELLOW_ALARM IIO_BUFFER_EVENT_CODE(1) -#define IIO_EVENT_CODE_ADT7410_ABOVE_CRIT IIO_BUFFER_EVENT_CODE(2) - static irqreturn_t adt7410_event_handler(int irq, void *private) { struct iio_dev *indio_dev = private; @@ -375,16 +367,22 @@ static irqreturn_t adt7410_event_handler(int irq, void *private) if (status & ADT7410_STAT_T_HIGH) iio_push_event(indio_dev, 0, - IIO_EVENT_CODE_ADT7410_ABOVE_ALARM, - timestamp); + IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0, + IIO_EV_TYPE_THRESH, + IIO_EV_DIR_RISING), + timestamp); if (status & ADT7410_STAT_T_LOW) iio_push_event(indio_dev, 0, - IIO_EVENT_CODE_ADT7410_BELLOW_ALARM, - timestamp); + IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0, + IIO_EV_TYPE_THRESH, + IIO_EV_DIR_FALLING), + timestamp); if (status & ADT7410_STAT_T_CRIT) iio_push_event(indio_dev, 0, - IIO_EVENT_CODE_ADT7410_ABOVE_CRIT, - timestamp); + IIO_UNMOD_EVENT_CODE(IIO_TEMP, 0, + IIO_EV_TYPE_THRESH, + IIO_EV_DIR_RISING), + timestamp); return IRQ_HANDLED; } |