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: 50781 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E38C6229FC for ; Mon, 6 Jul 2015 19:28:03 +0000 (UTC) Received: by widjy10 with SMTP id jy10sf55015612wid.3 for ; Mon, 06 Jul 2015 12:28:03 -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=B4ce8TgrznxHEnO05LJgVJvmoi+eGcTStR0JxksAQBY=; b=cK26eNeN3htv5jIhWylPIa7QUkLNA7fiFN1kGtiow+Q0BERkfiMEWs/AHyiA/4MvFg k3Z9Ap1UX+x8yPXsJjm60uaH2k5gr5WDfjVUq5xa5T1QeplV9YJbfEna/TbqWY7+9aTq EocUSTapIG2dVLSKYnDQPYvb7Zpm/ZAsoWPT7QsT0vMdaR5D3xH1pbJm2YWEdvg4udev 5CwgfvTowX3pcFHq4Jr/pUQJIFOZB0/qM9C/VmMe6tkltfTD1GPtpojThJ2iLJjUKsBo 5skUlX8vwzwIIamWeMSx64TTITvW8YUrdZtStlSR2QjpyRTAn3eKOUO9T1w14uyQK3wO lsbw== X-Gm-Message-State: ALoCoQlaj0TADedAecdf+LSBUtufTa1QVUQGEKqd0e3dXsU1EKd/XdwSoOPJMT+S/g0Usf0sf+gI X-Received: by 10.152.6.103 with SMTP id z7mr221293laz.8.1436210883233; Mon, 06 Jul 2015 12:28:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.103 with SMTP id l7ls735618laf.35.gmail; Mon, 06 Jul 2015 12:28:03 -0700 (PDT) X-Received: by 10.112.118.210 with SMTP id ko18mr392866lbb.75.1436210883039; Mon, 06 Jul 2015 12:28:03 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id jv10si16063251lbc.13.2015.07.06.12.28.02 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 12:28:02 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by labgy5 with SMTP id gy5so15588053lab.2 for ; Mon, 06 Jul 2015 12:28:02 -0700 (PDT) X-Received: by 10.112.166.2 with SMTP id zc2mr409409lbb.29.1436210882613; Mon, 06 Jul 2015 12:28:02 -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 hn6csp1921100lbb; Mon, 6 Jul 2015 12:28:01 -0700 (PDT) X-Received: by 10.70.138.8 with SMTP id qm8mr899793pdb.96.1436210880675; Mon, 06 Jul 2015 12:28:00 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ij4si30409727pbc.142.2015.07.06.12.27.59; Mon, 06 Jul 2015 12:28:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-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 S1754771AbbGFT1x (ORCPT + 8 others); Mon, 6 Jul 2015 15:27:53 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:34191 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753750AbbGFT1u (ORCPT ); Mon, 6 Jul 2015 15:27:50 -0400 Received: by pdbep18 with SMTP id ep18so110933400pdb.1 for ; Mon, 06 Jul 2015 12:27:50 -0700 (PDT) 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 Cc: linux-arm-kernel@lists.infradead.org, wsa@the-dreams.de, robert.jarzmik@free.fr, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, Shouming Wang , Vaibhav Hiremath 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> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@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.49 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 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; }