From patchwork Mon Jun 15 15:49:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 6610261 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EAEF1C0020 for ; Mon, 15 Jun 2015 15:57:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2441B205DA for ; Mon, 15 Jun 2015 15:57:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3CBCD20552 for ; Mon, 15 Jun 2015 15:57:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z4Wiq-0000WE-UV; Mon, 15 Jun 2015 15:54:52 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z4Whm-0008VD-Qn for linux-arm-kernel@lists.infradead.org; Mon, 15 Jun 2015 15:53:47 +0000 Received: by padev16 with SMTP id ev16so68194689pad.0 for ; Mon, 15 Jun 2015 08:53:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=j5kv6yYQy6VPO2dM+eDtquY9lphBTcNE1KONP5shmVQ=; b=DUAHcdxXbi82SVZEgtKR+FCgh9mr93hhlmktGlRT1NeaJNa8yQbru7rNa/dU0mjdsO pOjSvbaLQT31bmGw0DaxALDBkgfL51iKfH6W0KjJV5T+XU/WKzCGe5Ju4iIxZYao3KKi 6MlL1i7VsT0esqT13pc3ZeuDXcgXO2CEBw3qgct38LPECSG2MB+n2MaimcA81OOHvmj6 BhsMQmrKm+wGSTRC6jJp63N+Ltsexm84sWo42PmwvC4GTIpHs+4mnOtol0jURywFv1k5 cNNePN9+JOrOI++lEXu5gDlgGJzQd8oFD0fySqv53Q4x9tBNnSfspK6cmpu15bXrXY1e JugA== X-Gm-Message-State: ALoCoQkV22UnoKSS9smFV0ZqqHk9uR483q5rFk5a0daV+qNxYJSs+LZlnJnEXHLQphc4y18IMTox X-Received: by 10.66.63.70 with SMTP id e6mr32049830pas.62.1434383605576; Mon, 15 Jun 2015 08:53:25 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by mx.google.com with ESMTPSA id fs16sm12662484pdb.12.2015.06.15.08.53.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Jun 2015 08:53:24 -0700 (PDT) From: Vaibhav Hiremath To: linux-i2c@vger.kernel.org Subject: [PATCH-V2 03/12] i2c: pxa: Return I2C_RETRY when timeout in pio mode Date: Mon, 15 Jun 2015 21:19:50 +0530 Message-Id: <1434383399-2370-4-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1434383399-2370-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150615_085346_945240_2533D81F X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) Cc: Shouming Wang , robert.jarzmik@free.fr, Vaibhav Hiremath , linux-arm-kernel@lists.infradead.org, wsa@the-dreams.de X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Shouming Wang In case of timeout in pio mode of operation return I2C_RETRY. This behavior will be same as interrupt mode of operation. Signed-off-by: Shouming Wang [vaibhav.hiremath@linaro.org: Updated changelog] Signed-off-by: Vaibhav Hiremath Acked-by: Robert Jarzmik --- drivers/i2c/busses/i2c-pxa.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 023e59f..632008f 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -745,8 +745,10 @@ static int i2c_pxa_do_pio_xfer(struct pxa_i2c *i2c, ret = i2c->msg_idx; out: - if (timeout == 0) + if (timeout == 0) { i2c_pxa_scream_blue_murder(i2c, "timeout"); + ret = I2C_RETRY; + } return ret; }