From: Matthias Fend <matthias.fend@emfend.at>
To: Sakari Ailus <sakari.ailus@linux.intel.com>,
Jimmy Su <jimmy.su@intel.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Matthias Fend <matthias.fend@emfend.at>
Subject: [PATCH 3/3] media: i2c: ov08d10: fix analogue gain step
Date: Wed, 02 Dec 2026 09:40:02 +0100 [thread overview]
Message-ID: <20261202-ov08d10-ctrl-fixes-v1-3-778dc83babdd@emfend.at> (raw)
In-Reply-To: <20261202-ov08d10-ctrl-fixes-v1-0-778dc83babdd@emfend.at>
The gain value is down-shifted by 3 when written to the gain register, so
the effective granularity is 8. Respect this by reporting a step size of 8
instead of 1 and adjust the maximum value accordingly.
Fixes: 7be91e02ed57 ("media: i2c: Add ov08d10 camera sensor driver")
Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
---
drivers/media/i2c/ov08d10.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/i2c/ov08d10.c b/drivers/media/i2c/ov08d10.c
index 4a6ec91d0b9f60501882a4458ca15d3ef90df996..d2213719909ad0c660bf9de8cbaf122958d56e61 100644
--- a/drivers/media/i2c/ov08d10.c
+++ b/drivers/media/i2c/ov08d10.c
@@ -45,8 +45,8 @@
/* Analog gain controls from sensor */
#define OV08D10_REG_ANALOG_GAIN 0x24
#define OV08D10_ANAL_GAIN_MIN 128
-#define OV08D10_ANAL_GAIN_MAX 2047
-#define OV08D10_ANAL_GAIN_STEP 1
+#define OV08D10_ANAL_GAIN_MAX 2040
+#define OV08D10_ANAL_GAIN_STEP 8
/* Digital gain controls from sensor */
#define OV08D10_REG_MWB_DGAIN_C 0x21
--
2.34.1
prev parent reply other threads:[~2026-12-02 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 8:39 [PATCH 0/3] media: i2c: ov08d10: fix some controls Matthias Fend
2026-12-02 8:40 ` [PATCH 1/3] media: i2c: ov08d10: fix exposure Matthias Fend
2026-12-02 8:40 ` [PATCH 2/3] media: i2c: ov08d10: fix vertical blanking Matthias Fend
2026-12-02 8:40 ` Matthias Fend [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261202-ov08d10-ctrl-fixes-v1-3-778dc83babdd@emfend.at \
--to=matthias.fend@emfend.at \
--cc=jimmy.su@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®