]>
Commit | Line | Data |
---|---|---|
427cc94b GKH |
1 | From 933c1320847f5ed6b61a7d10f0a948aa98ccd7b0 Mon Sep 17 00:00:00 2001 |
2 | From: Janusz Krzysztofik <jmkrzyszt@gmail.com> | |
3 | Date: Sun, 24 Mar 2019 20:21:12 -0400 | |
4 | Subject: media: ov6650: Fix sensor possibly not detected on probe | |
5 | ||
6 | From: Janusz Krzysztofik <jmkrzyszt@gmail.com> | |
7 | ||
8 | commit 933c1320847f5ed6b61a7d10f0a948aa98ccd7b0 upstream. | |
9 | ||
10 | After removal of clock_start() from before soc_camera_init_i2c() in | |
11 | soc_camera_probe() by commit 9aea470b399d ("[media] soc-camera: switch | |
12 | I2C subdevice drivers to use v4l2-clk") introduced in v3.11, the ov6650 | |
13 | driver could no longer probe the sensor successfully because its clock | |
14 | was no longer turned on in advance. The issue was initially worked | |
15 | around by adding that missing clock_start() equivalent to OMAP1 camera | |
16 | interface driver - the only user of this sensor - but a propoer fix | |
17 | should be rather implemented in the sensor driver code itself. | |
18 | ||
19 | Fix the issue by inserting a delay between the clock is turned on and | |
20 | the sensor I2C registers are read for the first time. | |
21 | ||
22 | Tested on Amstrad Delta with now out of tree but still locally | |
23 | maintained omap1_camera host driver. | |
24 | ||
25 | Fixes: 9aea470b399d ("[media] soc-camera: switch I2C subdevice drivers to use v4l2-clk") | |
26 | ||
27 | Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> | |
28 | Cc: stable@vger.kernel.org | |
29 | Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> | |
30 | Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | |
31 | Signed-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 | */ |