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: 6498561 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 69682C0020 for ; Thu, 28 May 2015 13:13:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9F63F205D6 for ; Thu, 28 May 2015 13:13:56 +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 C2495205C4 for ; Thu, 28 May 2015 13:13:55 +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 1YxxaQ-0008FN-No; Thu, 28 May 2015 13:11:02 +0000 Received: from mail-pd0-f177.google.com ([209.85.192.177]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YxxWg-000531-25 for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2015 13:07:13 +0000 Received: by pdfh10 with SMTP id h10so41418560pdf.3 for ; Thu, 28 May 2015 06:06:48 -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=eFtHcIfRLBlUc7brBgMM6b2znidu0HITHDl9Td6RxbM=; b=hjK9xwu6q8S2PSrvH80+0EtIL5Ar6qFCWwht5PxJAxJMHJzH3XUjhL0IOgvaDjkEo1 V923ztifRGlI4XJnGzvDT4CXoym1E29DQPmh4VXgiNTIM3lXzP7MHXMF7HRhiRX3m88h iNGEv8f0zLH9ojzJmvy7NP87fEhbpAo23D3AtNlO8t8CvkKwIYRE/pllRdGmn3zqZlg4 yxijCuiUWgcNrvS6wzcag2VtkFkpmXwfDZBMknVhUt4Jjl5T1HI2QhFIGZ4HJ1o87TZS HBsjqL5BVUcLStfTFwIeLJTbuh4NkvOOkTzpv1Xumen2/FBLI//mVP/Zu/Gify523hHG Wx2w== X-Gm-Message-State: ALoCoQlX8IsNq5XdwWuZemDlE3iKr734E0qto8Gl9+MpLhr9/AZmlL+9fxY7HRbZAFqAOr3hIF4e 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150528_060710_191770_743AFBFB X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.8 (-) Cc: Shouming Wang , Vaibhav Hiremath , linux-arm-kernel@lists.infradead.org, Wolfram Sang 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 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; }