From patchwork Thu May 28 13:03:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 49107 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DACEE202A3 for ; Thu, 28 May 2015 13:06:55 +0000 (UTC) Received: by laboh3 with SMTP id oh3sf3430443lab.0 for ; Thu, 28 May 2015 06:06:54 -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=pC3j2iP49/qzR+gQ4rGIpNHoKzh7WZRRg8Lqp86casQ=; b=SRP/lUTFFwb+WTZY3kaL6GVyDfqTj9NL9RSLoCIf6HNVCZ9gV5UqxhMcaXT+Quls0t 1YreKYjdQ803tBwx6oiLAc5UAZi44yhe28118KA1JXXiV1vgRE6g8jwgxnG9BacUL0Ed sMkWZv0K7lrNOKCTyLAPagLIMlWtcjcXah8J5Kx0GNKHIeiZsBPqOWCRyFvWSWmO53hu oIYUff/Al8e4dBTtKKXQQQuR/Xw+xhOA7WXlM4XCbp9sXgLlJWOW4jmLHey6sR0Y/lEt x/czM5PFkU+ugv+3dEjmp++fRFKM4Ra0xtD9aJuET0FUXFhZlq25goonO5Z4BCbPWlMa wv4A== X-Gm-Message-State: ALoCoQliY1bc4yFV9bFU2l7LAhc1feBSiaCfRfTdsjWTck8W7UhdSXrXxG+n5qTegXWqoTTYBd8v X-Received: by 10.112.161.105 with SMTP id xr9mr2630855lbb.20.1432818414767; Thu, 28 May 2015 06:06:54 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.163.37 with SMTP id yf5ls104242lab.17.gmail; Thu, 28 May 2015 06:06:54 -0700 (PDT) X-Received: by 10.152.5.164 with SMTP id t4mr2720975lat.16.1432818414615; Thu, 28 May 2015 06:06:54 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id i2si1913094lam.72.2015.05.28.06.06.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 06:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by lagv1 with SMTP id v1so31198220lag.3 for ; Thu, 28 May 2015 06:06:54 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr2639111lbc.41.1432818414519; Thu, 28 May 2015 06:06:54 -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 hn6csp1144458lbb; Thu, 28 May 2015 06:06:53 -0700 (PDT) X-Received: by 10.68.57.136 with SMTP id i8mr5449269pbq.74.1432818410939; Thu, 28 May 2015 06:06:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id em5si3485083pbb.256.2015.05.28.06.06.50; Thu, 28 May 2015 06:06:50 -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 S1752625AbbE1NGt (ORCPT + 1 other); Thu, 28 May 2015 09:06:49 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:33200 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753221AbbE1NGs (ORCPT ); Thu, 28 May 2015 09:06:48 -0400 Received: by pdbqa5 with SMTP id qa5so41516711pdb.0 for ; Thu, 28 May 2015 06:06:48 -0700 (PDT) X-Received: by 10.70.103.200 with SMTP id fy8mr5336032pdb.136.1432818408524; Thu, 28 May 2015 06:06:48 -0700 (PDT) Received: from localhost.localdomain ([202.62.77.106]) by mx.google.com with ESMTPSA id dc5sm2392557pbc.53.2015.05.28.06.06.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 May 2015 06:06:47 -0700 (PDT) From: Vaibhav Hiremath To: linux-i2c@vger.kernel.org Cc: Wolfram Sang , linux-arm-kernel@lists.infradead.org, Shouming Wang , Vaibhav Hiremath Subject: [PATCH 06/12] i2c: pxa: Return I2C_RETRY when timeout in pio mode Date: Thu, 28 May 2015 18:33:38 +0530 Message-Id: <1432818224-17070-7-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1432818224-17070-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1432818224-17070-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.215.42 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 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 eb09071..2777d5c 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -841,8 +841,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; }