Skip to contentSkip to conversation

patch "iio: mma8452: Fix ignoring MMA8452_INT_DRDY" added to staging-linus

PATCH [email protected] 1 participant 1 message Jun 25, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    iio: mma8452: Fix ignoring MMA8452_INT_DRDY

to my staging git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
in the staging-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From b02ec67a8e38875cdc5f9214be885022f11c0017 Mon Sep 17 00:00:00 2001

From: Leonard Crestez <[email protected]>
Date: Thu, 7 Jun 2018 21:52:50 +0300
Subject: 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 605f72de137a ("iio: accel: mma8452: improvements to handle

multiple events")

---
 drivers/iio/accel/mma8452.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/accel/mma8452.c +1 -1
index 7e3d82cff3d5..c149c9c360fc 100644
@@ -1053,7 +1053,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) {
Signature · 1 line
2.18.0