Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 531124c6 authored by Harry Yang's avatar Harry Yang
Browse files

power: smb1390: Fix IRQ status for cp_irq property



The cp_irq property is designed to report all fired IRQs cached starting
from last read. However, most of the time, all registered IRQs are
returned instead, due to a SW bug.

Fix it.

Change-Id: Ic6e6c31b8e8c383b3400d0c9876aad6a8315a3ca
Signed-off-by: default avatarHarry Yang <harryy@codeaurora.org>
parent c1732fc0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -225,10 +225,11 @@ static irqreturn_t default_irq_handler(int irq, void *data)
	int i;

	for (i = 0; i < NUM_IRQS; ++i) {
		if (irq == chip->irqs[i])
		if (irq == chip->irqs[i]) {
			pr_debug("%s IRQ triggered\n", smb_irqs[i].name);
			chip->irq_status |= 1 << i;
		}
	}

	kobject_uevent(&chip->dev->kobj, KOBJ_CHANGE);
	return IRQ_HANDLED;