media: i2c: Switch control to V4L2_CID_ANALOGUE_GAIN
authorDaniel Scally <djrscally@gmail.com>
Tue, 23 Nov 2021 00:00:08 +0000 (01:00 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 30 Nov 2021 09:56:01 +0000 (10:56 +0100)
The V4L2_CID_GAIN control for this driver configures registers that
the datasheet specifies as analogue gain. Switch the control's ID
to V4L2_CID_ANALOGUE_GAIN.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/i2c/ov8865.c

index 87e34ad..2d5b7b8 100644 (file)
@@ -2150,7 +2150,7 @@ static int ov8865_exposure_configure(struct ov8865_sensor *sensor, u32 exposure)
 
 /* Gain */
 
-static int ov8865_gain_configure(struct ov8865_sensor *sensor, u32 gain)
+static int ov8865_analog_gain_configure(struct ov8865_sensor *sensor, u32 gain)
 {
        int ret;
 
@@ -2460,8 +2460,8 @@ static int ov8865_s_ctrl(struct v4l2_ctrl *ctrl)
                if (ret)
                        return ret;
                break;
-       case V4L2_CID_GAIN:
-               ret = ov8865_gain_configure(sensor, ctrl->val);
+       case V4L2_CID_ANALOGUE_GAIN:
+               ret = ov8865_analog_gain_configure(sensor, ctrl->val);
                if (ret)
                        return ret;
                break;
@@ -2506,7 +2506,8 @@ static int ov8865_ctrls_init(struct ov8865_sensor *sensor)
 
        /* Gain */
 
-       v4l2_ctrl_new_std(handler, ops, V4L2_CID_GAIN, 128, 8191, 128, 128);
+       v4l2_ctrl_new_std(handler, ops, V4L2_CID_ANALOGUE_GAIN, 128, 8191, 128,
+                         128);
 
        /* White Balance */