1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/root/target/linux/bcm27xx/patches-5.15/950-0755-media-i2c-ov7251-Switch-from-V4L2_CID_GAIN-to-V4L2_C.patch
Ycarus (Yannick Chabanois) 07d07219be Update bcm27xx 5.15 patches
2022-04-22 17:00:47 +02:00

36 lines
1.4 KiB
Diff

From 2a02813713c4cb051e409942db3e97443d4485e1 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Thu, 17 Feb 2022 18:31:56 +0000
Subject: [PATCH 755/828] media: i2c: ov7251: Switch from V4L2_CID_GAIN to
V4L2_CID_ANALOGUE_GAIN
The control is specifically for analogue gain, therefore switch
to using the control for that.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/media/i2c/ov7251.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/media/i2c/ov7251.c
+++ b/drivers/media/i2c/ov7251.c
@@ -752,7 +752,7 @@ static int ov7251_s_ctrl(struct v4l2_ctr
case V4L2_CID_EXPOSURE:
ret = ov7251_set_exposure(ov7251, ctrl->val);
break;
- case V4L2_CID_GAIN:
+ case V4L2_CID_ANALOGUE_GAIN:
ret = ov7251_set_gain(ov7251, ctrl->val);
break;
case V4L2_CID_TEST_PATTERN:
@@ -1346,8 +1346,8 @@ static int ov7251_probe(struct i2c_clien
V4L2_CID_VFLIP, 0, 1, 1, 0);
ov7251->exposure = v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
V4L2_CID_EXPOSURE, 1, 32, 1, 32);
- v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops, V4L2_CID_GAIN,
- 16, 1023, 1, 16);
+ v4l2_ctrl_new_std(&ov7251->ctrls, &ov7251_ctrl_ops,
+ V4L2_CID_ANALOGUE_GAIN, 16, 1023, 1, 16);
v4l2_ctrl_new_std_menu_items(&ov7251->ctrls, &ov7251_ctrl_ops,
V4L2_CID_TEST_PATTERN,
ARRAY_SIZE(ov7251_test_pattern_menu) - 1,