From patchwork Fri Dec 3 15:05:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sundar Iyer X-Patchwork-Id: 378171 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oB3F7aUu009402 for ; Fri, 3 Dec 2010 15:07:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084Ab0LCPGw (ORCPT ); Fri, 3 Dec 2010 10:06:52 -0500 Received: from eu1sys200aog105.obsmtp.com ([207.126.144.119]:60376 "EHLO eu1sys200aog105.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750807Ab0LCPGt (ORCPT ); Fri, 3 Dec 2010 10:06:49 -0500 Received: from source ([138.198.100.35]) (using TLSv1) by eu1sys200aob105.postini.com ([207.126.147.11]) with SMTP ID DSNKTPkHgUIxBIhHo9huq4tCw8smz5Y62zeS@postini.com; Fri, 03 Dec 2010 15:06:49 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 2CEBC1A8; Fri, 3 Dec 2010 15:06:39 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 599BAE6A; Fri, 3 Dec 2010 15:06:38 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 18CDB24C305; Fri, 3 Dec 2010 16:06:30 +0100 (CET) Received: from localhost (10.201.54.119) by exdcvycastm022.EQ1STM.local (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.2.254.0; Fri, 3 Dec 2010 16:06:36 +0100 From: Sundar Iyer To: , , , Cc: , , Sundar Iyer Subject: [PATCH 11/20] mfd/tc3589x: fix random interrupt misses Date: Fri, 3 Dec 2010 20:35:44 +0530 Message-ID: <1291388753-14662-12-git-send-email-sundar.iyer@stericsson.com> X-Mailer: git-send-email 1.7.2.dirty In-Reply-To: <1291388753-14662-1-git-send-email-sundar.iyer@stericsson.com> References: <1291388753-14662-1-git-send-email-sundar.iyer@stericsson.com> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 03 Dec 2010 15:07:36 +0000 (UTC) diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 5672d56..e173f33 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c @@ -158,6 +158,7 @@ static irqreturn_t tc3589x_irq(int irq, void *data) struct tc3589x *tc3589x = data; int status; +again: status = tc3589x_reg_read(tc3589x, TC3589x_IRQST); if (status < 0) return IRQ_NONE; @@ -172,9 +173,12 @@ static irqreturn_t tc3589x_irq(int irq, void *data) /* * A dummy read or write (to any register) appears to be necessary to * have the last interrupt clear (for example, GPIO IC write) take - * effect. + * effect. In such a case, recheck for any interrupt which is still + * pending. */ - tc3589x_reg_read(tc3589x, TC3589x_IRQST); + status = tc3589x_reg_read(tc3589x, TC3589x_IRQST); + if (status) + goto again; return IRQ_HANDLED; }