a46c0c98ea027882be3ef4c0ea6739e781216cfd
[openwrt/staging/chunkeey.git] /
1 From d2155366275ce70438d12169a59959e90b637f9c Mon Sep 17 00:00:00 2001
2 From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
3 Date: Fri, 12 Jun 2020 15:53:54 +0200
4 Subject: [PATCH] media: i2c: imx290: Move the settle time delay out
5 of loop
6
7 Commit 6544af9b04b4484867c234ba0be1b5008e4a14ee upstream.
8
9 The 10ms settle time is needed only at the end of all consecutive
10 register writes. So move the delay to outside of the for loop of
11 imx290_set_register_array().
12
13 Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
14 Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
15 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
16 Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
17 ---
18 drivers/media/i2c/imx290.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21 --- a/drivers/media/i2c/imx290.c
22 +++ b/drivers/media/i2c/imx290.c
23 @@ -404,11 +404,11 @@ static int imx290_set_register_array(str
24 ret = imx290_write_reg(imx290, settings->reg, settings->val);
25 if (ret < 0)
26 return ret;
27 -
28 - /* Settle time is 10ms for all registers */
29 - msleep(10);
30 }
31
32 + /* Provide 10ms settle time */
33 + msleep(10);
34 +
35 return 0;
36 }
37