summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorDaniel Scally <djrscally@gmail.com>2021-11-23 03:00:16 +0300
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-11-30 12:58:49 +0300
commit3fdd94e2bfa3a05a9a1ef7c49c7dccb10ebafdfb (patch)
tree6bb8d1a8c7b877b91700004272e1b3ea7a0ef649 /drivers/media
parent91f08141d3aba858278d0c8e61bc8aa84af51cac (diff)
downloadlinux-3fdd94e2bfa3a05a9a1ef7c49c7dccb10ebafdfb.tar.xz
media: i2c: Fix max gain in ov8865
The maximum gain figure in the v4l2 ctrl is wrong. The field is 12 bits wide, which is where the 8191 figure comes from, but the datasheet is specific that maximum gain is 16x (the low seven bits are fractional, so 16x gain is 2048) 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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/ov8865.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
index 1aa577dba0a3..ebdb20d3fe9d 100644
--- a/drivers/media/i2c/ov8865.c
+++ b/drivers/media/i2c/ov8865.c
@@ -2535,7 +2535,7 @@ static int ov8865_ctrls_init(struct ov8865_sensor *sensor)
/* Gain */
- v4l2_ctrl_new_std(handler, ops, V4L2_CID_ANALOGUE_GAIN, 128, 8191, 128,
+ v4l2_ctrl_new_std(handler, ops, V4L2_CID_ANALOGUE_GAIN, 128, 2048, 128,
128);
/* White Balance */