mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-27 20:42:52 +00:00
iio: mma8452: Fix ignoring MMA8452_INT_DRDY
commitb02ec67a8eupstream. 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:605f72de13("iio: accel: mma8452: improvements to handle multiple events") Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
129cdc94d4
commit
19dc0ed2e4
@@ -1034,7 +1034,7 @@ static irqreturn_t mma8452_interrupt(int irq, void *p)
|
||||
if (src < 0)
|
||||
return IRQ_NONE;
|
||||
|
||||
if (!(src & data->chip_info->enabled_events))
|
||||
if (!(src & (data->chip_info->enabled_events | MMA8452_INT_DRDY)))
|
||||
return IRQ_NONE;
|
||||
|
||||
if (src & MMA8452_INT_DRDY) {
|
||||
|
||||
Reference in New Issue
Block a user