0cd0ac8582d3266bfd623b18a70dd00d04c1d30a
[openwrt/staging/jow.git] /
1 From 07e177363a8c2596740f22a049568cd448d923dd Mon Sep 17 00:00:00 2001
2 From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
3 Date: Sun, 16 Oct 2022 09:15:23 +0300
4 Subject: [PATCH] media: i2c: imx290: Replace GAIN control with
5 ANALOGUE_GAIN
6
7 Upstream commit 3dd10515a1d9
8
9 The IMX290 gain register controls the analogue gain. Replace the
10 V4L2_CID_GAIN control with V4L2_CID_ANALOGUE_GAIN.
11
12 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
13 Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
14 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
15 ---
16 drivers/media/i2c/imx290.c | 4 ++--
17 1 file changed, 2 insertions(+), 2 deletions(-)
18
19 --- a/drivers/media/i2c/imx290.c
20 +++ b/drivers/media/i2c/imx290.c
21 @@ -524,7 +524,7 @@ static int imx290_set_ctrl(struct v4l2_c
22 return 0;
23
24 switch (ctrl->id) {
25 - case V4L2_CID_GAIN:
26 + case V4L2_CID_ANALOGUE_GAIN:
27 ret = imx290_write(imx290, IMX290_GAIN, ctrl->val, NULL);
28 break;
29
30 @@ -1015,7 +1015,7 @@ static int imx290_ctrl_init(struct imx29
31 * gain control should be adjusted accordingly.
32 */
33 v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
34 - V4L2_CID_GAIN, 0, 100, 1, 0);
35 + V4L2_CID_ANALOGUE_GAIN, 0, 100, 1, 0);
36
37 v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops,
38 V4L2_CID_EXPOSURE, 1, IMX290_VMAX_DEFAULT - 2, 1,