560203ecfad97f81132c691ee06bf41d0cf0a4ba
[openwrt/staging/ldir.git] /
1 From a3fd80d2328aa8d2fd48a9bcf3db90d10a357529 Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Sun, 16 Oct 2022 09:15:20 +0300
4 Subject: [PATCH] media: i2c: imx290: Move registers with fixed value
5 to init array
6
7 Upstream commit 0b274ef2208d.
8
9 Registers 0x3012, 0x3013 and 0x3480 are not documented and are set in
10 the per-mode register arrays with values indentical for all modes. Move
11 them to the common array.
12
13 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
14 Acked-by: Alexander Stein <alexander.stein@ew.tq-group.com>
15 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
16 ---
17 drivers/media/i2c/imx290.c | 8 ++------
18 1 file changed, 2 insertions(+), 6 deletions(-)
19
20 --- a/drivers/media/i2c/imx290.c
21 +++ b/drivers/media/i2c/imx290.c
22 @@ -192,6 +192,7 @@ static const struct imx290_regval imx290
23 { IMX290_REG_8BIT(0x300f), 0x00 },
24 { IMX290_REG_8BIT(0x3010), 0x21 },
25 { IMX290_REG_8BIT(0x3012), 0x64 },
26 + { IMX290_REG_8BIT(0x3013), 0x00 },
27 { IMX290_REG_8BIT(0x3016), 0x09 },
28 { IMX290_REG_8BIT(0x3070), 0x02 },
29 { IMX290_REG_8BIT(0x3071), 0x11 },
30 @@ -230,6 +231,7 @@ static const struct imx290_regval imx290
31 { IMX290_REG_8BIT(0x33b0), 0x50 },
32 { IMX290_REG_8BIT(0x33b2), 0x1a },
33 { IMX290_REG_8BIT(0x33b3), 0x04 },
34 + { IMX290_REG_8BIT(0x3480), 0x49 },
35 };
36
37 static const struct imx290_regval imx290_1080p_settings[] = {
38 @@ -239,15 +241,12 @@ static const struct imx290_regval imx290
39 { IMX290_OPB_SIZE_V, 10 },
40 { IMX290_X_OUT_SIZE, 1920 },
41 { IMX290_Y_OUT_SIZE, 1080 },
42 - { IMX290_REG_8BIT(0x3012), 0x64 },
43 - { IMX290_REG_8BIT(0x3013), 0x00 },
44 { IMX290_INCKSEL1, 0x18 },
45 { IMX290_INCKSEL2, 0x03 },
46 { IMX290_INCKSEL3, 0x20 },
47 { IMX290_INCKSEL4, 0x01 },
48 { IMX290_INCKSEL5, 0x1a },
49 { IMX290_INCKSEL6, 0x1a },
50 - { IMX290_REG_8BIT(0x3480), 0x49 },
51 /* data rate settings */
52 { IMX290_REPETITION, 0x10 },
53 { IMX290_TCLKPOST, 87 },
54 @@ -267,15 +266,12 @@ static const struct imx290_regval imx290
55 { IMX290_OPB_SIZE_V, 4 },
56 { IMX290_X_OUT_SIZE, 1280 },
57 { IMX290_Y_OUT_SIZE, 720 },
58 - { IMX290_REG_8BIT(0x3012), 0x64 },
59 - { IMX290_REG_8BIT(0x3013), 0x00 },
60 { IMX290_INCKSEL1, 0x20 },
61 { IMX290_INCKSEL2, 0x00 },
62 { IMX290_INCKSEL3, 0x20 },
63 { IMX290_INCKSEL4, 0x01 },
64 { IMX290_INCKSEL5, 0x1a },
65 { IMX290_INCKSEL6, 0x1a },
66 - { IMX290_REG_8BIT(0x3480), 0x49 },
67 /* data rate settings */
68 { IMX290_REPETITION, 0x10 },
69 { IMX290_TCLKPOST, 79 },