staging: iio: lis3l02dq move to new event code scheme
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
820e882a87
commit
18e69a9904
1 changed files with 30 additions and 6 deletions
|
@ -639,32 +639,56 @@ static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s)
|
||||||
|
|
||||||
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH)
|
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH)
|
||||||
iio_push_event(st->help.indio_dev, 0,
|
iio_push_event(st->help.indio_dev, 0,
|
||||||
IIO_EVENT_CODE_ACCEL_Z_HIGH,
|
IIO_MOD_EVENT_CODE(IIO_EV_CLASS_ACCEL,
|
||||||
|
0,
|
||||||
|
IIO_EV_MOD_Z,
|
||||||
|
IIO_EV_TYPE_THRESH,
|
||||||
|
IIO_EV_DIR_RISING),
|
||||||
st->thresh_timestamp);
|
st->thresh_timestamp);
|
||||||
|
|
||||||
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_LOW)
|
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_LOW)
|
||||||
iio_push_event(st->help.indio_dev, 0,
|
iio_push_event(st->help.indio_dev, 0,
|
||||||
IIO_EVENT_CODE_ACCEL_Z_LOW,
|
IIO_MOD_EVENT_CODE(IIO_EV_CLASS_ACCEL,
|
||||||
|
0,
|
||||||
|
IIO_EV_MOD_Z,
|
||||||
|
IIO_EV_TYPE_THRESH,
|
||||||
|
IIO_EV_DIR_FALLING),
|
||||||
st->thresh_timestamp);
|
st->thresh_timestamp);
|
||||||
|
|
||||||
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_HIGH)
|
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_HIGH)
|
||||||
iio_push_event(st->help.indio_dev, 0,
|
iio_push_event(st->help.indio_dev, 0,
|
||||||
IIO_EVENT_CODE_ACCEL_Y_HIGH,
|
IIO_MOD_EVENT_CODE(IIO_EV_CLASS_ACCEL,
|
||||||
|
0,
|
||||||
|
IIO_EV_MOD_Y,
|
||||||
|
IIO_EV_TYPE_THRESH,
|
||||||
|
IIO_EV_DIR_RISING),
|
||||||
st->thresh_timestamp);
|
st->thresh_timestamp);
|
||||||
|
|
||||||
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_LOW)
|
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_LOW)
|
||||||
iio_push_event(st->help.indio_dev, 0,
|
iio_push_event(st->help.indio_dev, 0,
|
||||||
IIO_EVENT_CODE_ACCEL_Y_LOW,
|
IIO_MOD_EVENT_CODE(IIO_EV_CLASS_ACCEL,
|
||||||
|
0,
|
||||||
|
IIO_EV_MOD_Y,
|
||||||
|
IIO_EV_TYPE_THRESH,
|
||||||
|
IIO_EV_DIR_FALLING),
|
||||||
st->thresh_timestamp);
|
st->thresh_timestamp);
|
||||||
|
|
||||||
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_HIGH)
|
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_HIGH)
|
||||||
iio_push_event(st->help.indio_dev, 0,
|
iio_push_event(st->help.indio_dev, 0,
|
||||||
IIO_EVENT_CODE_ACCEL_X_HIGH,
|
IIO_MOD_EVENT_CODE(IIO_EV_CLASS_ACCEL,
|
||||||
|
0,
|
||||||
|
IIO_EV_MOD_X,
|
||||||
|
IIO_EV_TYPE_THRESH,
|
||||||
|
IIO_EV_DIR_RISING),
|
||||||
st->thresh_timestamp);
|
st->thresh_timestamp);
|
||||||
|
|
||||||
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_LOW)
|
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_LOW)
|
||||||
iio_push_event(st->help.indio_dev, 0,
|
iio_push_event(st->help.indio_dev, 0,
|
||||||
IIO_EVENT_CODE_ACCEL_X_LOW,
|
IIO_MOD_EVENT_CODE(IIO_EV_CLASS_ACCEL,
|
||||||
|
0,
|
||||||
|
IIO_EV_MOD_X,
|
||||||
|
IIO_EV_TYPE_THRESH,
|
||||||
|
IIO_EV_DIR_FALLING),
|
||||||
st->thresh_timestamp);
|
st->thresh_timestamp);
|
||||||
/* reenable the irq */
|
/* reenable the irq */
|
||||||
enable_irq(st->us->irq);
|
enable_irq(st->us->irq);
|
||||||
|
|
Loading…
Add table
Reference in a new issue