From patchwork Tue Nov 10 13:39:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 7591181 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@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 CDD589F2F7 for ; Tue, 10 Nov 2015 13:39:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC9BA2064E for ; Tue, 10 Nov 2015 13:39:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0BA0420646 for ; Tue, 10 Nov 2015 13:39:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751998AbbKJNjK (ORCPT ); Tue, 10 Nov 2015 08:39:10 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:36835 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751807AbbKJNjJ (ORCPT ); Tue, 10 Nov 2015 08:39:09 -0500 Received: by wmww144 with SMTP id w144so118053849wmw.1; Tue, 10 Nov 2015 05:39:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=7wqH90JFksLo8IRR2+OvblnvBDHGiemaX/OyzJeucgY=; b=NWeJQefB+RB8ZtcEPqLsUOs7kPp60eyt8oawW+gkySaX5zKvVLISLzx/d+qVFinl0/ 5JgUPnRMj5zEQpPBg3fE9OWuu0rlQ8KD2nN7CYAYrnpRorGkyc/Sdz0H3ARG/Cwqst7X 1j6sKFKxZmzEdQPsyCYH45RPOxw3e6L/vOyeltZk48DJag/UvIyS7965t7d/iiu0LHQl GEEHdTgiFv6g2S+mfWh+FoaQmkKs6fB++5Eah+pfTGFs8ScVDFVcZfSdVA3oYc64hqdT nmKC92JQfzGYEHgwaMh++lR7xK3876+ber57+gaQoQ7IRaxtujB3dKfncYgtgPO79I0N +2aQ== X-Received: by 10.28.14.140 with SMTP id 134mr4617264wmo.44.1447162748419; Tue, 10 Nov 2015 05:39:08 -0800 (PST) Received: from groucho.site (ipbcc0ddf2.dynamic.kabel-deutschland.de. [188.192.221.242]) by smtp.gmail.com with ESMTPSA id s9sm419274wmf.2.2015.11.10.05.39.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Nov 2015 05:39:07 -0800 (PST) From: Ulrich Hecht To: linux-media@vger.kernel.org Cc: linux-sh@vger.kernel.org, magnus.damm@gmail.com, laurent.pinchart@ideasonboard.com, Ulrich Hecht Subject: [PATCH] media: adv7180: increase delay after reset to 5ms Date: Tue, 10 Nov 2015 14:39:00 +0100 Message-Id: <1447162740-28096-1-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.6.1 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Initialization of the ADV7180 chip fails on the Renesas R8A7790-based Lager board about 50% of the time. This patch resolves the issue by increasing the minimum delay after reset from 2 ms to 5 ms, following the recommendation in the ADV7180 datasheet: "Executing a software reset takes approximately 2 ms. However, it is recommended to wait 5 ms before any further I2C writes are performed." Signed-off-by: Ulrich Hecht Acked-by: Laurent Pinchart Acked-by: Lars-Peter Clausen --- drivers/media/i2c/adv7180.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index f82c8aa..3c3c4bf 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -1112,7 +1112,7 @@ static int init_device(struct adv7180_state *state) mutex_lock(&state->mutex); adv7180_write(state, ADV7180_REG_PWR_MAN, ADV7180_PWR_MAN_RES); - usleep_range(2000, 10000); + usleep_range(5000, 10000); ret = state->chip_info->init(state); if (ret)