summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-08-21 20:34:47 +0530
committerNiket Sirsi <nsirsi@nvidia.com>2011-08-22 17:47:23 -0700
commit8c2de1f6c518ab8d3ee67725b0a86cd30e7528a6 (patch)
tree9d1f3287dba442d59c6d3ffc0ffee4943cc85f2a /drivers/mfd
parent67b7a1e686bd6822930f8936d89a85460b9aa884 (diff)
mfd: tps80031: Handle watch dog interrupt properly
Handling watch dog interrupt properly. bug 841080 Change-Id: I09fe1433005537d3294b16f2959ddd5abf1d8b24 Reviewed-on: http://git-master/r/48364 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/tps80031.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c
index 6fa885b369e8..17a4c14f69ea 100644
--- a/drivers/mfd/tps80031.c
+++ b/drivers/mfd/tps80031.c
@@ -614,7 +614,6 @@ static irqreturn_t tps80031_charge_control_irq(int irq, void *data)
int i;
u8 cont_sts;
u8 org_sts;
-
if (irq != (tps80031->irq_base + TPS80031_INT_CHRG_CTRL)) {
dev_err(tps80031->dev, "%s() Got the illegal interrupt %d\n",
__func__, irq);
@@ -633,11 +632,14 @@ static irqreturn_t tps80031_charge_control_irq(int irq, void *data)
* for charge control interrupt */
cont_sts = org_sts ^ tps80031->prev_cont_stat1;
tps80031->prev_cont_stat1 = org_sts;
+ /* Clear watchdog timer state */
+ tps80031->prev_cont_stat1 &= ~(1 << 4);
cont_sts &= 0x5F;
for (i = 0; i < 8; ++i) {
if (!controller_stat1_irq_nr[i])
continue;
+
if ((cont_sts & BIT(i)) &&
(tps80031->irq_en & BIT(controller_stat1_irq_nr[i])))
handle_nested_irq(tps80031->irq_base +
@@ -736,6 +738,9 @@ static int __devinit tps80031_irq_init(struct tps80031 *tps80031, int irq,
return ret;
}
+ /* Clear watch dog interrupt status in status */
+ tps80031->prev_cont_stat1 &= ~(1 << 4);
+
tps80031->irq_base = irq_base;
tps80031->irq_chip.name = "tps80031";