From patchwork Tue Jul 14 21:19:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sonasath, Moiz" X-Patchwork-Id: 35604 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 n6ELKRiV008558 for ; Tue, 14 Jul 2009 21:20:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756238AbZGNVT6 (ORCPT ); Tue, 14 Jul 2009 17:19:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756510AbZGNVT6 (ORCPT ); Tue, 14 Jul 2009 17:19:58 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:36856 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756238AbZGNVT5 convert rfc822-to-8bit (ORCPT ); Tue, 14 Jul 2009 17:19:57 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6ELJp2A018024; Tue, 14 Jul 2009 16:19:56 -0500 Received: from dlep20.itg.ti.com (localhost [127.0.0.1]) by dlep33.itg.ti.com (8.13.7/8.13.7) with ESMTP id n6ELJpad005724; Tue, 14 Jul 2009 16:19:51 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep20.itg.ti.com (8.12.11/8.12.11) with ESMTP id n6ELJoh3012076; Tue, 14 Jul 2009 16:19:50 -0500 (CDT) Received: from dlee06.ent.ti.com ([157.170.170.11]) by dlee73.ent.ti.com ([157.170.170.88]) with mapi; Tue, 14 Jul 2009 16:19:50 -0500 From: "Sonasath, Moiz" To: "linux-omap@vger.kernel.org" CC: "Kamat, Nishant" , Paul Walmsley Date: Tue, 14 Jul 2009 16:19:39 -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: AcoEwVK9CFFqCrZTTgCTew13UD4r2AAB1m/g 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 Acked-by: Nishanth Menon --- 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) {