Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2158929ybm; Thu, 23 May 2019 12:19:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy39UaPcQc3Tk7kBt7wmZtxUbwK6Joi9QQ6BLM+DuC+QwSSrErCCvadIn+F4Odj8ukj9Zw X-Received: by 2002:aa7:90d3:: with SMTP id k19mr104538482pfk.1.1558639163261; Thu, 23 May 2019 12:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558639163; cv=none; d=google.com; s=arc-20160816; b=lYEm+IZIvSUM3fyWAqyeLU7ePVZ/KDXPpKaKRcaEarc898jyHv9BH5j9K33WqfRSJ+ nfYDMOclJ/vyZiVfESxamXX38UgIaxLo9on5AralmI911QUGWnB0jtV6M9aY9WShG4MS Uz9oax0CxGZdONY5UiYRaJY7d6h4jr0gu8qV2VK8KI9008Fx2gC31l/wI7RZzgSu6Sv3 u9zEGjoNUXD9CsPNKliZwBGckxrh33Bqq7b7nIwag/NNxMmYtx3Fvb3LDZM9F6UFVads FjwGoyzDeEaaEKDE+HElloBSOGyG7nNsTf7WHmVbXlwRbxdOXmA7gpEs6ZQ4Hw2ceN9x b2hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f7tjILMWIsjjr0QkKPeYncvBRplM3sp7UEGOhqWauac=; b=xVAz6xR8ffcI5mbdAv0UN4Zy5J8VQXY8Lb6twghhMUFOQlbb/si/kX34M/Mor+ZB9y TXha0i8NRtF6pJC6jf/F7CQ7E2QG5s06m3IVXExyquHIZMhPZqixd088qNFXCBo2lDdA arNkCCKa8GHBdK03PynJ74lN5Dw69M0EePX0nBeb5JsenqQOYvXTXEEwv2BCxQ65pYVj 2JHafB04RQOPkn7/QQNqlvktrmIgvUAqw8osLO9jfGSFVo4EmFjgQlEfZEMsfcbsXCqO lIECbrPGoNMV7E2RO0ulq0PaHjXSqwX41tR7co8BvwS29P3hI+T7Uk0JzqWS0//WEKYS h/aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GrwjIGIr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si463412plr.297.2019.05.23.12.19.08; Thu, 23 May 2019 12:19:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GrwjIGIr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389187AbfEWTQZ (ORCPT + 99 others); Thu, 23 May 2019 15:16:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:50948 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389160AbfEWTQT (ORCPT ); Thu, 23 May 2019 15:16:19 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 30B8C2133D; Thu, 23 May 2019 19:16:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638978; bh=n+iY9opbL5gGBysj7809sJCcw/XvIAH8N+H6U+pwqK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GrwjIGIrvxCYv2zjKhtc5sSSwjBNf9g3Gl0OI7t2V6j8YTpFBMbc7oJsZfFbBPZ70 KIrJr3GNSjYRmtNHFzYYyLh9sovDNEDUQU+9yr1AfrIvljVJ7P3Y5jO+MsYA/AlQqX wp6tm7PhXritxMUSCN1/iUME1GbN4KNTxz+bMUxg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Janusz Krzysztofik , Sakari Ailus , Mauro Carvalho Chehab Subject: [PATCH 4.19 034/114] media: ov6650: Fix sensor possibly not detected on probe Date: Thu, 23 May 2019 21:05:33 +0200 Message-Id: <20190523181734.865863531@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181731.372074275@linuxfoundation.org> References: <20190523181731.372074275@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Janusz Krzysztofik commit 933c1320847f5ed6b61a7d10f0a948aa98ccd7b0 upstream. After removal of clock_start() from before soc_camera_init_i2c() in soc_camera_probe() by commit 9aea470b399d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk") introduced in v3.11, the ov6650 driver could no longer probe the sensor successfully because its clock was no longer turned on in advance. The issue was initially worked around by adding that missing clock_start() equivalent to OMAP1 camera interface driver - the only user of this sensor - but a propoer fix should be rather implemented in the sensor driver code itself. Fix the issue by inserting a delay between the clock is turned on and the sensor I2C registers are read for the first time. Tested on Amstrad Delta with now out of tree but still locally maintained omap1_camera host driver. Fixes: 9aea470b399d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk") Signed-off-by: Janusz Krzysztofik Cc: stable@vger.kernel.org Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman --- drivers/media/i2c/ov6650.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/media/i2c/ov6650.c +++ b/drivers/media/i2c/ov6650.c @@ -815,6 +815,8 @@ static int ov6650_video_probe(struct i2c if (ret < 0) return ret; + msleep(20); + /* * check and show product ID and manufacturer ID */