]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.19.31/media-i2c-ov5640-fix-post-reset-delay.patch
Linux 4.19.31
[thirdparty/kernel/stable-queue.git] / releases / 4.19.31 / media-i2c-ov5640-fix-post-reset-delay.patch
1 From 1d4c41f3d887bcd66e82cb2fda124533dad8808a Mon Sep 17 00:00:00 2001
2 From: Loic Poulain <loic.poulain@linaro.org>
3 Date: Wed, 30 Jan 2019 11:48:07 -0500
4 Subject: media: i2c: ov5640: Fix post-reset delay
5
6 From: Loic Poulain <loic.poulain@linaro.org>
7
8 commit 1d4c41f3d887bcd66e82cb2fda124533dad8808a upstream.
9
10 According to the ov5640 specification (2.7 power up sequence), host can
11 access the sensor's registers 20ms after reset. Trying to access them
12 before leads to undefined behavior and result in sporadic initialization
13 errors.
14
15 Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
16 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
17 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
18 Cc: Adam Ford <aford173@gmail.com>
19 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
20
21 ---
22 drivers/media/i2c/ov5640.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25 --- a/drivers/media/i2c/ov5640.c
26 +++ b/drivers/media/i2c/ov5640.c
27 @@ -1759,7 +1759,7 @@ static void ov5640_reset(struct ov5640_d
28 usleep_range(1000, 2000);
29
30 gpiod_set_value_cansleep(sensor->reset_gpio, 0);
31 - usleep_range(5000, 10000);
32 + usleep_range(20000, 25000);
33 }
34
35 static int ov5640_set_power_on(struct ov5640_dev *sensor)