From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
Cc: sakari.ailus@linux.intel.com, laurent.pinchart@ideasonboard.com,
kieran.bingham@ideasonboard.com,
"Himanshu Bhavani" <himanshu.bhavani@siliconsignals.io>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Hans Verkuil" <hverkuil@xs4all.nl>,
"Ricardo Ribalda" <ribalda@chromium.org>,
"Hans de Goede" <hansg@kernel.org>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"André Apitzsch" <git@apitzsch.eu>,
"Arnd Bergmann" <arnd@arndb.de>,
"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
"Dongcheng Yan" <dongcheng.yan@intel.com>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Jingjing Xiong" <jingjing.xiong@intel.com>,
"Matthias Fend" <matthias.fend@emfend.at>,
"Heimir Thor Sverrisson" <heimir.sverrisson@gmail.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 2/2] media: i2c: add ov2735 image sensor driver
Date: Wed, 6 Aug 2025 01:47:18 +0300 [thread overview]
Message-ID: <aJKJ9l_j2VJFEcHe@smile.fi.intel.com> (raw)
In-Reply-To: <20250731061004.5447-3-hardevsinh.palaniya@siliconsignals.io>
On Thu, Jul 31, 2025 at 11:39:58AM +0530, Hardevsinh Palaniya wrote:
> 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)
...
> +#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.
...
> +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;
> + mutex_lock(&ov2735->page_lock);
Since you have cleanup.h, why not use guard() here?
> + /* Perform page access before read/write */
> + if (ov2735->current_page != page) {
> + ret = cci_write(ov2735->cci, OV2735_REG_PAGE_SELECT, page, err);
> + if (ret)
> + goto err_mutex_unlock;
> + ov2735->current_page = page;
> + }
> +
> +err_mutex_unlock:
> + mutex_unlock(&ov2735->page_lock);
> + return ret;
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2025-08-05 22:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-31 6:09 [PATCH v6 0/2] media: i2c: Add ov2735 camera " Hardevsinh Palaniya
2025-07-31 6:09 ` [PATCH v6 1/2] dt-bindings: media: i2c: Add ov2735 sensor Hardevsinh Palaniya
2025-07-31 6:13 ` Krzysztof Kozlowski
2025-07-31 6:36 ` Hardevsinh Palaniya
2025-07-31 6:39 ` Krzysztof Kozlowski
2025-07-31 7:10 ` Hardevsinh Palaniya
2025-07-31 7:21 ` Krzysztof Kozlowski
2025-07-31 8:56 ` Hardevsinh Palaniya
2025-07-31 6:09 ` [PATCH v6 2/2] media: i2c: add ov2735 image sensor driver Hardevsinh Palaniya
2025-08-05 22:47 ` Andy Shevchenko [this message]
2025-08-06 6:09 ` Hardevsinh Palaniya
2025-08-08 11:42 ` Sakari Ailus
2025-08-08 12:34 ` Hardevsinh Palaniya
2025-08-08 20:21 ` Sakari Ailus
2025-08-08 9:13 ` [PATCH v6 0/2] media: i2c: Add ov2735 camera " Hardevsinh Palaniya
2025-08-08 12:21 ` Laurent Pinchart
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=aJKJ9l_j2VJFEcHe@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=benjamin.mugnier@foss.st.com \
--cc=bryan.odonoghue@linaro.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dongcheng.yan@intel.com \
--cc=git@apitzsch.eu \
--cc=hansg@kernel.org \
--cc=hardevsinh.palaniya@siliconsignals.io \
--cc=heimir.sverrisson@gmail.com \
--cc=himanshu.bhavani@siliconsignals.io \
--cc=hverkuil@xs4all.nl \
--cc=jingjing.xiong@intel.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=matthias.fend@emfend.at \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=sylvain.petinot@foss.st.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®