build/patch/kernel/archive/sunxi-6.2/patches.megous/media-i2c-ov8858-Increase-analog-gain-range.patch

31 lines
889 B
Diff
Raw Permalink Normal View History

From ad6b5bef82e0ae59aad9b86b8fd987639c619059 Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Fri, 27 May 2022 16:46:13 +0200
Subject: [PATCH 334/391] media: i2c: ov8858: Increase analog gain range
Tested to work up to 11 bits and down to 0.
Signed-off-by: Ondrej Jirman <megi@xff.cz>
---
drivers/media/i2c/ov8858.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov8858.c b/drivers/media/i2c/ov8858.c
index 69ec1efef..a83a5b702 100644
--- a/drivers/media/i2c/ov8858.c
+++ b/drivers/media/i2c/ov8858.c
@@ -59,8 +59,8 @@
#define OV8858_GAIN_H_MASK 0x07
#define OV8858_GAIN_H_SHIFT 8
#define OV8858_GAIN_L_MASK 0xff
-#define OV8858_GAIN_MIN 0x80
-#define OV8858_GAIN_MAX 0x400
+#define OV8858_GAIN_MIN 0x0
+#define OV8858_GAIN_MAX 0x7ff
#define OV8858_GAIN_STEP 1
#define OV8858_GAIN_DEFAULT 0x80
--
2.35.3