651fe86631aa537dd613491e715421b04ae88e71
[openwrt/staging/neocturne.git] /
1 From ed38a89fe4fc0b668bfe68559fa4adf55fb4de63 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 17 Feb 2022 18:31:56 +0000
4 Subject: [PATCH] media: i2c: ov7251: Switch from V4L2_CID_GAIN to
5 V4L2_CID_ANALOGUE_GAIN
6
7 The control is specifically for analogue gain, therefore switch
8 to using the control for that.
9
10 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
11 ---
12 drivers/media/i2c/ov7251.c | 6 +++---
13 1 file changed, 3 insertions(+), 3 deletions(-)
14
15 --- a/drivers/media/i2c/ov7251.c
16 +++ b/drivers/media/i2c/ov7251.c
17 @@ -752,7 +752,7 @@ static int ov7251_s_ctrl(struct v4l2_ctr
18 case V4L2_CID_EXPOSURE:
19 ret = ov7251_set_exposure(ov7251, ctrl->val);
20 break;
21 - case V4L2_CID_GAIN:
22 + case V4L2_CID_ANALOGUE_GAIN:
23 ret = ov7251_set_gain(ov7251, ctrl->val);
24 break;
25 case V4L2_CID_TEST_PATTERN:
26 @@ -1346,8 +1346,8 @@ static int ov7251_probe(struct i2c_clien
27 V4L2_CID_VFLIP, 0, 1, 1, 0);
28 ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
29 V4L2_CID_EXPOSURE, 1, 32, 1, 32);
30 - v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops, V4L2_CID_GAIN,
31 - 16, 1023, 1, 16);
32 + v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
33 + V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 16);
34 v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops,
35 V4L2_CID_TEST_PATTERN,
36 ARRAY_SIZE(ov7251_test_pattern_menu) - 1,