[PATCH 03/11] media: i2c: ov5640: Fix minimum gain to 1.0x
From: Kieran Bingham
Date: Fri May 01 2026 - 11:42:23 EST
Adjust the Analogue Gain control to only provide a minimum gain of 1.0,
and ensure that this is the default value rather than '0' which is
invalid.
Requesting an Analogue gain of 0 would result in a black frame, and when
the sensor is over exposed the Exposure should be reduced instead.
Signed-off-by: Kieran Bingham <kieran.bingham@xxxxxxxxxxxxxxxx>
---
drivers/media/i2c/ov5640.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c
index b5e529ea662b..0dc4f4272d05 100644
--- a/drivers/media/i2c/ov5640.c
+++ b/drivers/media/i2c/ov5640.c
@@ -3484,7 +3484,7 @@ static int ov5640_init_controls(struct ov5640_dev *sensor)
ctrls->auto_gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_AUTOGAIN,
0, 1, 1, 1);
ctrls->gain = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_ANALOGUE_GAIN,
- 0, 1023, 1, 0);
+ 16, 1023, 1, 16);
ctrls->saturation = v4l2_ctrl_new_std(hdl, ops, V4L2_CID_SATURATION,
0, 255, 1, 64);
--
2.52.0