From patchwork Tue Jul 21 15:14:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sonasath, Moiz" X-Patchwork-Id: 36550 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6LFEpFn027449 for ; Tue, 21 Jul 2009 15:14:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755178AbZGUPOs (ORCPT ); Tue, 21 Jul 2009 11:14:48 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755268AbZGUPOs (ORCPT ); Tue, 21 Jul 2009 11:14:48 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:49693 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755131AbZGUPOr convert rfc822-to-8bit (ORCPT ); Tue, 21 Jul 2009 11:14:47 -0400 Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6LFEgwr025564; Tue, 21 Jul 2009 10:14:47 -0500 Received: from dlep20.itg.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id n6LFEgt9012633; Tue, 21 Jul 2009 10:14:42 -0500 (CDT) Received: from dlee74.ent.ti.com (localhost [127.0.0.1]) by dlep20.itg.ti.com (8.12.11/8.12.11) with ESMTP id n6LFEfnC018302; Tue, 21 Jul 2009 10:14:41 -0500 (CDT) Received: from dlee06.ent.ti.com ([157.170.170.11]) by dlee74.ent.ti.com ([157.170.170.8]) with mapi; Tue, 21 Jul 2009 10:14:41 -0500 From: "Sonasath, Moiz" To: "linux-i2c@vger.kernel.org" CC: "linux-omap@vger.kernel.org" Date: Tue, 21 Jul 2009 10:14:40 -0500 Subject: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR Thread-Topic: [PATCH 2/3] [OMAP:I2C]In case of a NACK|ARDY|AL return from the ISR Thread-Index: AcoKFYJabjSfVQnqQIyhrDMj6V+lswAAGPSg Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org In case of a NACK or ARDY or AL interrupt, complete the request. There is no need to service the RRDY/RDR or XRDY/XDR interrupts. Refer TRM SWPU114: Figure 18-31.I2C Master Transmitter Mode, Interrupt Method, in F/S and HS Modes http://focus.ti.com/pdfs/wtbu/SWPU114T_PrelimFinalEPDF_06_25_2009.pdf Signed-off-by: Moiz Sonasath Signed-off-by: Vikram pandita --- drivers/i2c/busses/i2c-omap.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index d280acf..05b5e4c 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -685,8 +685,10 @@ omap_i2c_isr(int this_irq, void *dev_id) err |= OMAP_I2C_STAT_AL; } if (stat & (OMAP_I2C_STAT_ARDY | OMAP_I2C_STAT_NACK | - OMAP_I2C_STAT_AL)) + OMAP_I2C_STAT_AL)) { omap_i2c_complete_cmd(dev, err); + return IRQ_HANDLED; + } if (stat & (OMAP_I2C_STAT_RRDY | OMAP_I2C_STAT_RDR)) { u8 num_bytes = 1; if (dev->fifo_size) {