Thread (16 messages) 16 messages, 5 authors, 2025-08-08

Re: [PATCH v6 2/2] media: i2c: add ov2735 image sensor driver

From: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
Date: 2025-08-06 06:09:35
Also in: linux-media, lkml

On Thu, Jul 31, 2025 at 11:39:58AM +0530, Hardevsinh Palaniya wrote:
quoted
Add a v4l2 subdevice driver for the Omnivision OV2735 sensor.

The Omnivision OV2735 is a 1/2.7-Inch CMOS image sensor with an
active array size of 1920 x 1080.

The following features are supported:
- Manual exposure an gain control support
- vblank/hblank control support
- Test pattern support control
- Supported resolution: 1920 x 1080 @ 30fps (SGRBG10)
...
quoted
+#define OV2735_REG_LONG_EXPOSURE             OV2735_PAGE_REG16(0x01, 0x03)
+#define      OV2735_EXPOSURE_MIN                     4
+#define      OV2735_EXPOSURE_STEP                    1
+
+#define OV2735_REG_ANALOG_GAIN                  OV2735_PAGE_REG8(0x01, 0x24)
+#define      OV2735_ANALOG_GAIN_MIN                  0x10
+#define      OV2735_ANALOG_GAIN_MAX                  0xff
+#define      OV2735_ANALOG_GAIN_STEP                 1
+#define      OV2735_ANALOG_GAIN_DEFAULT              0x10
I dunno if the TAB after #define is something being required here, to me sounds
like a misplacement.
 
When I applied the patch, I didn’t see those tabs either.
I'm not sure how they appeared in the patch, but I will correct them.
 
quoted
+static int ov2735_page_access(struct ov2735 *ov2735, u32 reg, int *err)
+{
+     u8 page = reg >> CCI_REG_PRIVATE_SHIFT;
+     int ret = 0;
+
+     if (err && *err)
+             return *err;
quoted
+     mutex_lock(&ov2735->page_lock);
Since you have cleanup.h, why not use guard() here?
will update

Best Regards,
Hardev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help