From 0c5329891706a0860a7c597b0bb06f28797eb37a Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Mon, 14 Nov 2011 19:50:13 +0530 Subject: mfd: tps6591x: Acks the enabled interrupts only Acknowledge the tps6591x interrupt by processor only when it is enabled by client. The acknowledge is done by writing 1 to INT_STS register. bug 896151 Reviewed-on: http://git-master/r/64824 (cherry picked from commit 31fbb94516e5b600ad536e35c95e64b525b21f61) Change-Id: I7f4328f6084f6e94884ac4a87c5c3a247f7fa99d Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/65453 Rebase-Id: R4803a1635b5404226679de09dc15260ff60d44e6 --- drivers/mfd/tps6591x.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/mfd') diff --git a/drivers/mfd/tps6591x.c b/drivers/mfd/tps6591x.c index 0831a034bed3..cc3ff239e24b 100644 --- a/drivers/mfd/tps6591x.c +++ b/drivers/mfd/tps6591x.c @@ -519,6 +519,7 @@ static irqreturn_t tps6591x_irq(int irq, void *data) struct tps6591x *tps6591x = data; int ret = 0; u8 tmp[3]; + u8 int_ack; u32 acks, mask = 0; int i; @@ -531,8 +532,10 @@ static irqreturn_t tps6591x_irq(int irq, void *data) return IRQ_NONE; } if (tmp[i]) { + /* Ack only those interrupts which are enabled */ + int_ack = tmp[i] & (~(tps6591x->mask_cache[i])); ret = tps6591x_write(tps6591x->dev, - TPS6591X_INT_STS + 2*i, tmp[i]); + TPS6591X_INT_STS + 2*i, int_ack); if (ret < 0) { dev_err(tps6591x->dev, "failed to write interrupt status\n"); -- cgit v1.2.3