Hello Hans,
Thank you for the patches,
On Tue, Oct 14, 2025 at 07:40:11PM +0200, Hans de Goede wrote:
A maximum gain of 0xffff / 65525 seems unlikely and testing indeed shows that the gain control wraps-around at 4096, so set the maximum gain to 0xfff / 4095.
The minimum gain of 0x100 is correct. Setting bits 8-11 to 0x0 results in the same gain values as setting these bits to 0x1, with bits 0-7 still increasing the gain when going from 0x000 - 0x0ff in the exact same range as when going from 0x100 - 0x1ff.
Two things:
1 - You could mention in the commit msg that this is about the analog gain.
2 - You can add a patch for the max digital gain: which is defined as follows:
#define OV01A10_DGTL_GAIN_MAX 0x3ffff
My testing shows that the digital_gain ctrl wraps-around at 16383 = 0x3fff
with that:
Tested-by: Mehdi Djait mehdi.djait@linux.intel.com # Dell XPS 9315 Reviewed-by: Mehdi Djait mehdi.djait@linux.intel.com
Fixes: 0827b58dabff ("media: i2c: add ov01a10 image sensor driver") Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede hansg@kernel.org