From patchwork Mon Jul 6 19:24:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 6727511 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 1BFF5C05AC for ; Mon, 6 Jul 2015 19:31:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52D33205EC for ; Mon, 6 Jul 2015 19:31:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 69673205EB for ; Mon, 6 Jul 2015 19:31:07 +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 1ZCC3u-0007MK-G6; Mon, 06 Jul 2015 19:28:18 +0000 Received: from mail-pa0-f48.google.com ([209.85.220.48]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZCC3n-0007Fq-2W for linux-arm-kernel@lists.infradead.org; Mon, 06 Jul 2015 19:28:11 +0000 Received: by pactm7 with SMTP id tm7so99950029pac.2 for ; Mon, 06 Jul 2015 12:27:50 -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=uJ8B8Jj/UUZUu2uDI5fXyNkYG0ShJ4EGuPdaLwl26Ls=; b=hOjCa5f6U+0WiYCy+30xeUWeTtLT/0VVf3Y1Rj/CktE5FMjD+VUF6+lgwASIIHPkYt sSACgiH/t/34c4yugkXjxkdBQEDqW1K/qFswM1+VAY6w9VG6Xp6Ec+7OhFH5ll6SBmhE to7VzOstU2xvaPnXKuKOzDTOwC45QCvwxYb7X/UvJOV5e9Ak3BDe49STGTsmP8BPxztc r7podIY3vzUgrXYTKhOPnshY87RaDWj0zvl8fwhJ9+B9QIAeiXy+MAFMt4snIRdfbf74 3v6Uhu4hveEEqZ2HO7tOURfvcm0kkFKLKmTJRh92lFI6wPZp4PkTOrbnONwvOZLHLyZf HvtQ== X-Gm-Message-State: ALoCoQkq5CBNWKe2DUhXT3JNwVAsstbQjfIjeQhtJTjIUdysVr6CAwP1y5zJBR1QCvnjThAeVQJY X-Received: by 10.66.102.4 with SMTP id fk4mr722540pab.131.1436210870395; Mon, 06 Jul 2015 12:27:50 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by mx.google.com with ESMTPSA id x7sm19293964pas.28.2015.07.06.12.27.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 12:27:49 -0700 (PDT) From: Vaibhav Hiremath To: linux-i2c@vger.kernel.org Subject: [PATCH-v3 03/11] i2c: pxa: Return I2C_RETRY when timeout in pio mode Date: Tue, 7 Jul 2015 00:54:47 +0530 Message-Id: <1436210695-19159-4-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436210695-19159-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1436210695-19159-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150706_122811_149221_3E3BCD78 X-CRM114-Status: GOOD ( 12.32 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, wsa@the-dreams.de, Shouming Wang , linux-kernel@vger.kernel.org, Vaibhav Hiremath , robh+dt@kernel.org, robert.jarzmik@free.fr, linux-arm-kernel@lists.infradead.org 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.9 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; }