From patchwork Thu Apr 30 21:44:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 6307211 Return-Path: X-Original-To: patchwork-linux-rockchip@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC0849F373 for ; Thu, 30 Apr 2015 21:44:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D19ED2013D for ; Thu, 30 Apr 2015 21:44: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 DE52C20103 for ; Thu, 30 Apr 2015 21:44: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 1YnwGL-0000ov-9Y; Thu, 30 Apr 2015 21:44:53 +0000 Received: from mail-ie0-x230.google.com ([2607:f8b0:4001:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnwGJ-0000fN-BP for linux-rockchip@lists.infradead.org; Thu, 30 Apr 2015 21:44:52 +0000 Received: by iebrs15 with SMTP id rs15so78312104ieb.3 for ; Thu, 30 Apr 2015 14:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=BgMLG2S4pl1h7+9eXZUv9yHJKGv/eSbAIQZlfrX2ZUA=; b=NyJgE1xH3EkRcR/HEh0tnOBSlHy5l2VDegXajv2TW/qOKOnmy9vdi8VbS5teq+v/Rr ovbJ6iPBACw4dcH4m4xKvJaYwDTJXpI+TuyckD3Vp+6xjYNg1BBR3gres6kdas8OP0vx 6DN9XmIm6ig4mfAcuYLEIoXTllhVvs1o9faHw= 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; bh=BgMLG2S4pl1h7+9eXZUv9yHJKGv/eSbAIQZlfrX2ZUA=; b=ZqJqWa1lVeTC29Fwcg9nY1ZyRNhW5mbVKLgz5gjn2m40hmG6F6b6LgbmoelLERKuDt 2qZKFmd1bty8FMv3xQHxfj2YB8j4kcmdILA66zRV5QBvGI3EGbpIGKVmRKOGtV9wzRBe Qlg+ScBpM1qvm/hOLA86q800XmYR2VuI6y45t/JjN/gOcLV7gU1jn9KGxTSaAKt5YR4n dmyR4iQXXCvtzYdm91Ra3LZB3G5mbxI1ukVOSm8qJvbwEWPQP7S0y+vmRaME7sGm04s3 d7W+P8RStEvkFf37DSng6ArZTc9tO5irn0bfLvpPIEZiyldCV/Fp4tJyg/P7svURmVGx oWnw== X-Gm-Message-State: ALoCoQlW87N1G5QJuEPrOPoKndhDGk/3HhD8s+nTYu1RCHVvRlFWECb7mD+w5Wv5Mae2AN4W+gbs X-Received: by 10.50.18.113 with SMTP id v17mr6465302igd.8.1430430267092; Thu, 30 Apr 2015 14:44:27 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by mx.google.com with ESMTPSA id vk8sm1796018igb.4.2015.04.30.14.44.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Apr 2015 14:44:26 -0700 (PDT) From: Doug Anderson To: Wolfram Sang Subject: [PATCH] i2c: rk3x: Increase wait timeout to 1 second Date: Thu, 30 Apr 2015 14:44:07 -0700 Message-Id: <1430430247-9632-1-git-send-email-dianders@chromium.org> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150430_144451_459974_D1DAC306 X-CRM114-Status: GOOD ( 10.09 ) X-Spam-Score: -0.8 (/) Cc: Addy Ke , Dmitry Torokhov , Heiko Stuebner , Max Schwarz , Doug Anderson , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 While it's not sensible for an i2c command to _actually_ need more than 200ms to complete, let's increase the timeout anyway. Why? It turns out that if you've got a large number of printks going out to a serial console, interrupts on a CPU can be disabled for hundreds of milliseconds. That's not a great situation to be in to start with (maybe we should put a cap in vprintk_emit()) but it's pretty annoying to start seeing unexplained i2c timeouts. A normal system shouldn't see i2c timeouts anyway, so increasing the timeout should help people debugging without hurting other people excessively. Signed-off-by: Doug Anderson Tested-by: Caesar Wang Tested-by: Caesar Wang --- drivers/i2c/busses/i2c-rk3x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c index 019d542..72e97e30 100644 --- a/drivers/i2c/busses/i2c-rk3x.c +++ b/drivers/i2c/busses/i2c-rk3x.c @@ -72,7 +72,7 @@ enum { #define REG_INT_ALL 0x7f /* Constants */ -#define WAIT_TIMEOUT 200 /* ms */ +#define WAIT_TIMEOUT 1000 /* ms */ #define DEFAULT_SCL_RATE (100 * 1000) /* Hz */ enum rk3x_i2c_state {