From: "sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>
To: Tarang Raval <tarang.raval@siliconsignals.io>
Cc: "Hardevsinh Palaniya" <hardevsinh.palaniya@siliconsignals.io>,
"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>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"André Apitzsch" <git@apitzsch.eu>,
"Heimir Thor Sverrisson" <heimir.sverrisson@gmail.com>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Matthias Fend" <matthias.fend@emfend.at>,
"Dongcheng Yan" <dongcheng.yan@intel.com>,
"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
"Arnd Bergmann" <arnd@arndb.de>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Hans de Goede" <hansg@kernel.org>,
"Jingjing Xiong" <jingjing.xiong@intel.com>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 2/2] media: i2c: add ov2735 image sensor driver
Date: Tue, 2 Sep 2025 10:53:01 +0300 [thread overview]
Message-ID: <aLaiXTw2cieUCzn_@kekkonen.localdomain> (raw)
In-Reply-To: <PN3P287MB18298FB93EDC498572742B2A8B07A@PN3P287MB1829.INDP287.PROD.OUTLOOK.COM>
Hi Tarang, Hardev,
On Mon, Sep 01, 2025 at 06:44:46AM +0000, Tarang Raval wrote:
> Hi Hardev, Sakari
>
> > 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)
> >
> > Co-developed-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
> > Signed-off-by: Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>
> > Signed-off-by: Hardevsinh Palaniya <hardevsinh.palaniya@siliconsignals.io>
> > ---
> > MAINTAINERS | 1 +
> > drivers/media/i2c/Kconfig | 10 +
> > drivers/media/i2c/Makefile | 1 +
> > drivers/media/i2c/ov2735.c | 1109 ++++++++++++++++++++++++++++++++++++
> > 4 files changed, 1121 insertions(+)
> > create mode 100644 drivers/media/i2c/ov2735.c
>
> ...
>
> > +static int ov2735_enum_mbus_code(struct v4l2_subdev *sd,
> > + struct v4l2_subdev_state *sd_state,
> > + struct v4l2_subdev_mbus_code_enum *code)
> > +{
> > + if (code->index >= 0)
>
> Hardev, I believe this condition is always true.
>
> You should write:
> if (code->index > 0)
>
> Sakari, Could you please remove the equals sign when you apply the patch?
Done. I also switched it to container_of_const(); the diff is:
diff --git a/drivers/media/i2c/ov2735.c b/drivers/media/i2c/ov2735.c
index da5978b96146..b96600204141 100644
--- a/drivers/media/i2c/ov2735.c
+++ b/drivers/media/i2c/ov2735.c
@@ -402,7 +402,7 @@ static int ov2735_multi_reg_write(struct ov2735 *ov2735,
static inline struct ov2735 *to_ov2735(struct v4l2_subdev *_sd)
{
- return container_of(_sd, struct ov2735, sd);
+ return container_of_const(_sd, struct ov2735, sd);
}
static int ov2735_enable_test_pattern(struct ov2735 *ov2735, u32 pattern)
@@ -428,8 +428,8 @@ static int ov2735_enable_test_pattern(struct ov2735 *ov2735, u32 pattern)
static int ov2735_set_ctrl(struct v4l2_ctrl *ctrl)
{
- struct ov2735 *ov2735 = container_of(ctrl->handler, struct ov2735,
- handler);
+ struct ov2735 *ov2735 =
+ container_of_const(ctrl->handler, struct ov2735, handler);
struct v4l2_mbus_framefmt *fmt;
struct v4l2_subdev_state *state;
u64 vts;
@@ -697,7 +697,7 @@ static int ov2735_enum_mbus_code(struct v4l2_subdev *sd,
struct v4l2_subdev_state *sd_state,
struct v4l2_subdev_mbus_code_enum *code)
{
- if (code->index >= 0)
+ if (code->index)
return -EINVAL;
code->code = MEDIA_BUS_FMT_SGRBG10_1X10;
--
Kind regards,
Sakari Ailus
next prev parent reply other threads:[~2025-09-02 7:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 9:09 [PATCH v9 0/2] media: i2c: Add ov2735 camera " Hardevsinh Palaniya
2025-08-29 9:09 ` [PATCH v9 1/2] dt-bindings: media: i2c: Add ov2735 sensor Hardevsinh Palaniya
2025-08-29 9:09 ` [PATCH v9 2/2] media: i2c: add ov2735 image sensor driver Hardevsinh Palaniya
2025-09-01 6:44 ` Tarang Raval
2025-09-02 7:53 ` sakari.ailus [this message]
2025-09-02 14:30 ` Hardevsinh Palaniya
2025-08-29 10:28 ` [PATCH v9 0/2] media: i2c: Add ov2735 camera " Sakari Ailus
2025-08-29 10:44 ` Hardevsinh Palaniya
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=aLaiXTw2cieUCzn_@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=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=krzk+dt@kernel.org \
--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=sylvain.petinot@foss.st.com \
--cc=tarang.raval@siliconsignals.io \
/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®