]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.19/media-ov6650-fix-sensor-possibly-not-detected-on-probe.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 5.0.19 / media-ov6650-fix-sensor-possibly-not-detected-on-probe.patch
CommitLineData
427cc94b
GKH
1From 933c1320847f5ed6b61a7d10f0a948aa98ccd7b0 Mon Sep 17 00:00:00 2001
2From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
3Date: Sun, 24 Mar 2019 20:21:12 -0400
4Subject: media: ov6650: Fix sensor possibly not detected on probe
5
6From: Janusz Krzysztofik <jmkrzyszt@gmail.com>
7
8commit 933c1320847f5ed6b61a7d10f0a948aa98ccd7b0 upstream.
9
10After removal of clock_start() from before soc_camera_init_i2c() in
11soc_camera_probe() by commit 9aea470b399d ("[media] soc-camera: switch
12I2C subdevice drivers to use v4l2-clk") introduced in v3.11, the ov6650
13driver could no longer probe the sensor successfully because its clock
14was no longer turned on in advance. The issue was initially worked
15around by adding that missing clock_start() equivalent to OMAP1 camera
16interface driver - the only user of this sensor - but a propoer fix
17should be rather implemented in the sensor driver code itself.
18
19Fix the issue by inserting a delay between the clock is turned on and
20the sensor I2C registers are read for the first time.
21
22Tested on Amstrad Delta with now out of tree but still locally
23maintained omap1_camera host driver.
24
25Fixes: 9aea470b399d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk")
26
27Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
28Cc: stable@vger.kernel.org
29Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
30Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
31Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32
33---
34 drivers/media/i2c/ov6650.c | 2 ++
35 1 file changed, 2 insertions(+)
36
37--- a/drivers/media/i2c/ov6650.c
38+++ b/drivers/media/i2c/ov6650.c
39@@ -814,6 +814,8 @@ static int ov6650_video_probe(struct i2c
40 if (ret < 0)
41 return ret;
42
43+ msleep(20);
44+
45 /*
46 * check and show product ID and manufacturer ID
47 */