mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
37 lines
1.4 KiB
Diff
37 lines
1.4 KiB
Diff
|
From ed38a89fe4fc0b668bfe68559fa4adf55fb4de63 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] 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,
|