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: 49874 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C530B205DE for ; Mon, 15 Jun 2015 15:53:30 +0000 (UTC) Received: by wicnd19 with SMTP id nd19sf7873898wic.0 for ; Mon, 15 Jun 2015 08:53:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=yDAci1kyEqPBNq1iLi++bDB2r4YtuPqvRaSpBh2xOHs=; b=f1/U/sHtQy/PnbGRK920/Zws6NcR1CQBdCUhM/jGNSWmZpLuFAgvaLEOr0p8h+vCJ4 AaRH2UGygvXcSaJLWTliJfZ0x9z665a/xtn83BpvqcySlRnX1a1DawlL7KgkGLeoSqKT wgctqrf2rR6ZuLP5K52qei9WndErLw8RsoG4QXcT25HII9wviGNTEwY1kJkz4OuwcR80 r5DrFIY9oIidfUWxV/BMfYt0agTwmEKhUsu6ZLfbiGPizHTr6JCvcCH0hidn+1F7sdof 4GyAYQUBo2SRTRM5ieLCynSMhDXsn85h5JzbxNaYk44gIyTwNRHru+RTsF0Q9u8LH9v7 F/uA== X-Gm-Message-State: ALoCoQlNKsM/3hrJ4MmEb0tyFgxiXxXOzX/N7jk2H66JkJq/iy8L1shiwmcK0hlXP9mrzJy9qA+c X-Received: by 10.112.171.41 with SMTP id ar9mr764371lbc.24.1434383610037; Mon, 15 Jun 2015 08:53:30 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.203.133 with SMTP id kq5ls833079lac.102.gmail; Mon, 15 Jun 2015 08:53:29 -0700 (PDT) X-Received: by 10.112.148.166 with SMTP id tt6mr874795lbb.11.1434383609888; Mon, 15 Jun 2015 08:53:29 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id si6si10782580lac.128.2015.06.15.08.53.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 15 Jun 2015 08:53:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lblr1 with SMTP id r1so29871131lbl.0 for ; Mon, 15 Jun 2015 08:53:29 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr960694lbc.32.1434383609761; Mon, 15 Jun 2015 08:53:29 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1508766lbb; Mon, 15 Jun 2015 08:53:28 -0700 (PDT) X-Received: by 10.66.199.8 with SMTP id jg8mr50593973pac.15.1434383607873; Mon, 15 Jun 2015 08:53:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i6si18495084pdr.64.2015.06.15.08.53.27; Mon, 15 Jun 2015 08:53:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-i2c-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083AbbFOPx0 (ORCPT + 1 other); Mon, 15 Jun 2015 11:53:26 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:33158 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755812AbbFOPx0 (ORCPT ); Mon, 15 Jun 2015 11:53:26 -0400 Received: by pdjn11 with SMTP id n11so75765155pdj.0 for ; Mon, 15 Jun 2015 08:53:25 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, wsa@the-dreams.de, robert.jarzmik@free.fr, Shouming Wang , Vaibhav Hiremath 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> Sender: linux-i2c-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-i2c@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vaibhav.hiremath@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 --- 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; }