Skip to content

Commit b02ec67

Browse files
cdleonardjic23
authored andcommitted
iio: mma8452: Fix ignoring MMA8452_INT_DRDY
Interrupts are ignored if no event bit is set in the status status register and this breaks the buffer interface. No data is shown when running "iio_generic_buffer -n mma8451 -a" and interrupt counts go crazy. Fix by not returning IRQ_NONE if DRDY is set. Fixes: 605f72d ("iio: accel: mma8452: improvements to handle multiple events") Signed-off-by: Leonard Crestez <[email protected]> cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 288320f commit b02ec67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/accel/mma8452.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
10531053
if (src < 0)
10541054
return IRQ_NONE;
10551055

1056-
if (!(src & data->chip_info->enabled_events))
1056+
if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY)))
10571057
return IRQ_NONE;
10581058

10591059
if (src & MMA8452_INT_DRDY) {

0 commit comments

Comments
 (0)