Skip to contentSkip to conversation

media: i2c: ov01a10: Fix digital gain range

PATCH In review Mehdi Djait 3 participants 6 messages Jan 8 – Jan 9

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: i2c: ov01a10: Fix digital gain range

Digital gain wraps-around at the maximum of 16838 / 0x3fff. Fix the maximum digital gain by setting it to 0x3fff.

---
 drivers/media/i2c/ov01a10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov01a10.c +1 -1
index a35648f29932..fb4212ae3fbb 100644
@@ -63,7 +63,7 @@
 #define OV01A10_REG_DIGITAL_GAIN_GR	CCI_REG24(0x3513)
 #define OV01A10_REG_DIGITAL_GAIN_R	CCI_REG24(0x3516)
 #define OV01A10_DGTL_GAIN_MIN		0
-#define OV01A10_DGTL_GAIN_MAX		0x3ffff
+#define OV01A10_DGTL_GAIN_MAX		0x3fff
 #define OV01A10_DGTL_GAIN_STEP		1
 #define OV01A10_DGTL_GAIN_DEFAULT	1024
 
Signature · 1 line
2.51.1
Reviewed-by on v1 1/1
#1 lore raw

Hi,

Quoted 4 lines · Mehdi Djait

Digital gain wraps-around at the maximum of 16838 / 0x3fff. Fix the maximum digital gain by setting it to 0x3fff.

Thanks, patch looks good to me:

Regards,

Hans

Quoted 17 lines
---
 drivers/media/i2c/ov01a10.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ov01a10.c +1 -1
index a35648f29932..fb4212ae3fbb 100644
@@ -63,7 +63,7 @@
 #define OV01A10_REG_DIGITAL_GAIN_GR	CCI_REG24(0x3513)
 #define OV01A10_REG_DIGITAL_GAIN_R	CCI_REG24(0x3516)
 #define OV01A10_DGTL_GAIN_MIN		0
-#define OV01A10_DGTL_GAIN_MAX		0x3ffff
+#define OV01A10_DGTL_GAIN_MAX		0x3fff
 #define OV01A10_DGTL_GAIN_STEP		1
 #define OV01A10_DGTL_GAIN_DEFAULT	1024
 
maintainer
#2 lore raw
In reply to Mehdi Djait

Hi Mehdi,

Quoted 4 lines · Mehdi Djait

Digital gain wraps-around at the maximum of 16838 / 0x3fff. Fix the maximum digital gain by setting it to 0x3fff.

Thanks for the patch. I believe this is already covered in my branch.

Signature · 3 lines
Kind regards,

Sakari Ailus
#3 lore raw

Hi Sakari,

Quoted 9 lines · Sakari Ailus

Hi Mehdi,

Quoted 4 lines · Mehdi Djait

Digital gain wraps-around at the maximum of 16838 / 0x3fff. Fix the maximum digital gain by setting it to 0x3fff.

Thanks for the patch. I believe this is already covered in my branch.

If you are talking about:

ad3ea1197513 media: i2c: ov01a10: Fix analogue gain range

this is for the analogue gain, the patch I sent is for the digital gain.

--
Kind Regards
Mehdi Djait

maintainer
#4 lore raw

Hi Mehdi,

Quoted 11 lines · Mehdi Djait

Hi Sakari,

Quoted 8 lines · Sakari Ailus

Hi Mehdi,

Quoted 4 lines · Mehdi Djait

Digital gain wraps-around at the maximum of 16838 / 0x3fff. Fix the maximum digital gain by setting it to 0x3fff.

Quoted 7 lines
Quoted 1 line

Thanks for the patch. I believe this is already covered in my branch.

If you are talking about:

ad3ea1197513 media: i2c: ov01a10: Fix analogue gain range

this is for the analogue gain, the patch I sent is for the digital gain.

Ah, my mistake. Thanks; I'll pick this to the same PR then.

The same Fixes: tag (+ Cc: stable) would seem appropriate:

Fixes 0827b58dabff ("media: i2c: add ov01a10 image sensor driver")
Signature · 1 line
Sakari Ailus
#5 lore raw

Hi Sakari,

Quoted 20 lines · Sakari Ailus

Hi Mehdi,

Quoted 17 lines · Mehdi Djait

Hi Sakari,

Quoted 9 lines · Sakari Ailus

Hi Mehdi,

Quoted 4 lines · Mehdi Djait

Digital gain wraps-around at the maximum of 16838 / 0x3fff. Fix the maximum digital gain by setting it to 0x3fff.

Thanks for the patch. I believe this is already covered in my branch.

If you are talking about:

ad3ea1197513 media: i2c: ov01a10: Fix analogue gain range

Quoted 7 lines
Quoted 1 line

this is for the analogue gain, the patch I sent is for the digital gain.

Ah, my mistake. Thanks; I'll pick this to the same PR then.

The same Fixes: tag (+ Cc: stable) would seem appropriate:

Fixes 0827b58dabff ("media: i2c: add ov01a10 image sensor driver")

Yes, thank you!

--
Kind Regards
Mehdi Djait