Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206034
b: refs/heads/master
c: b98c9e6
h: refs/heads/master
v: v3
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Aug 3, 2010
1 parent 22197af commit 675d85e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 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: 34f57cc7894b7ba124006149a0c7b5f58496b25f
refs/heads/master: b98c9e60a44645737fa2ffef9a2d1ef2243c50d5
2 changes: 2 additions & 0 deletions trunk/drivers/staging/iio/accel/lis3l02dq.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Form of high byte dependant on justification set in ctrl reg */
* @helper: data and func pointer allowing generic functions
* @us: actual spi_device
* @work_thresh: bh for threshold events
* @thresh_timestamp: timestamp for threshold interrupts.
* @inter: used to check if new interrupt has been triggered
* @trig: data ready trigger registered with iio
* @tx: transmit buffer
Expand All @@ -161,6 +162,7 @@ struct lis3l02dq_state {
struct iio_sw_ring_helper_state help;
struct spi_device *us;
struct work_struct work_thresh;
s64 thresh_timestamp;
bool inter;
struct iio_trigger *trig;
u8 *tx;
Expand Down
14 changes: 7 additions & 7 deletions trunk/drivers/staging/iio/accel/lis3l02dq_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ static int lis3l02dq_thresh_handler_th(struct iio_dev *indio_dev,
struct lis3l02dq_state *st = lis3l02dq_h_to_s(h);

/* Stash the timestamp somewhere convenient for the bh */
h->last_timestamp = timestamp;
st->thresh_timestamp = timestamp;
schedule_work(&st->work_thresh);

return 0;
Expand All @@ -640,32 +640,32 @@ static void lis3l02dq_thresh_handler_bh_no_check(struct work_struct *work_s)
if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_HIGH)
iio_push_event(st->help.indio_dev, 0,
IIO_EVENT_CODE_ACCEL_Z_HIGH,
st->help.last_timestamp);
st->thresh_timestamp);

if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Z_LOW)
iio_push_event(st->help.indio_dev, 0,
IIO_EVENT_CODE_ACCEL_Z_LOW,
st->help.last_timestamp);
st->thresh_timestamp);

if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_HIGH)
iio_push_event(st->help.indio_dev, 0,
IIO_EVENT_CODE_ACCEL_Y_HIGH,
st->help.last_timestamp);
st->thresh_timestamp);

if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_Y_LOW)
iio_push_event(st->help.indio_dev, 0,
IIO_EVENT_CODE_ACCEL_Y_LOW,
st->help.last_timestamp);
st->thresh_timestamp);

if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_HIGH)
iio_push_event(st->help.indio_dev, 0,
IIO_EVENT_CODE_ACCEL_X_HIGH,
st->help.last_timestamp);
st->thresh_timestamp);

if (t & LIS3L02DQ_REG_WAKE_UP_SRC_INTERRUPT_X_LOW)
iio_push_event(st->help.indio_dev, 0,
IIO_EVENT_CODE_ACCEL_X_LOW,
st->help.last_timestamp);
st->thresh_timestamp);
/* reenable the irq */
enable_irq(st->us->irq);
/* Ack and allow for new interrupts */
Expand Down

0 comments on commit 675d85e

Please sign in to comment.