From: "sakari.ailus@linux.intel.com" <sakari.ailus@linux.intel.com>
To: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
Cc: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
"laurent.pinchart@ideasonboard.com"
<laurent.pinchart@ideasonboard.com>,
Tarang Raval <tarang.raval@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+cisco@kernel.org>,
Hans de Goede <johannes.goede@oss.qualcomm.com>,
Mehdi Djait <mehdi.djait@linux.intel.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Himanshu Bhavani <himanshu.bhavani@siliconsignals.io>,
Heimir Thor Sverrisson <heimir.sverrisson@gmail.com>,
Jingjing Xiong <jingjing.xiong@intel.com>,
Svyatoslav Ryhel <clamor95@gmail.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 v3 2/3] media: i2c: add os02g10 image sensor driver
Date: Thu, 18 Jun 2026 13:56:49 +0300 [thread overview]
Message-ID: <ajPO8cOS_jgJIcqD@kekkonen.localdomain> (raw)
In-Reply-To: <MA0P287MB2178300B0541EC81B91312F588E32@MA0P287MB2178.INDP287.PROD.OUTLOOK.COM>
Hi Elgin, Vladimir,
On Thu, Jun 18, 2026 at 06:22:14AM +0000, Elgin Perumbilly wrote:
> Hi Vladimir,
>
> Thank you for the review.
>
> I have addressed all of the comments except for two, where I am not entirely
> sure about the requested changes. Could you please take a look at the points
> below and let me know your opinion?
>
> > On 4/24/26 12:25, Elgin Perumbilly wrote:
> > > Add a v4l2 subdevice driver for the Omnivision os02g10 sensor.
> > >
> > > The Omnivision os02g10 is a 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
> > > - vflip/hflip control support
> > > - Test pattern control support
> > > - Supported resolution: 1920 x 1080 @ 30fps (SBGGR10)
> > >
> > > Signed-off-by: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
> > > Reviewed-by: Tarang Raval <tarang.raval@siliconsignals.io>
>
> ...
>
> > > +#include <linux/array_size.h>
> > > +#include <linux/bitops.h>
> > > +#include <linux/cleanup.h>
> > > +#include <linux/clk.h>
> > > +#include <linux/container_of.h>
> > > +#include <linux/delay.h>
> > > +#include <linux/err.h>
> > > +#include <linux/gpio/consumer.h>
> > > +#include <linux/i2c.h>
> > > +#include <linux/module.h>
> > > +#include <linux/mutex.h>
> > > +#include <linux/pm_runtime.h>
> > > +#include <linux/property.h>
> > > +#include <linux/regulator/consumer.h>
> > > +#include <linux/units.h>
> > > +#include <linux/types.h>
> > > +#include <linux/time.h>
> > > +#include <linux/regmap.h>
> >
> > Please sort the list of includes in alphabetical order, also you
> > may consider to shrink the list by removing quite many inherited
> > includes.
>
> Some maintainers prefer the "include what you use" approach, like Andy,
> so I added all the headers that are directly used. Should I now remove
> any inherited includes?
Andy has been indeed asking to include what you use; this way cleaning up
the headers in the future becomes possible.
>
> > > +#include <media/v4l2-cci.h>
> > > +#include <media/v4l2-ctrls.h>
> > > +#include <media/v4l2-device.h>
> > > +#include <media/v4l2-fwnode.h>
> > > +#include <media/v4l2-mediabus.h>
>
> ...
>
> > > +static int os02g10_set_framefmt(struct os02g10 *os02g10,
> > > + struct v4l2_subdev_state *state)
> > > +{
> > > + const struct v4l2_mbus_framefmt *format;
> > > + const struct os02g10_mode *mode;
> > > + int ret = 0;
> > > +
> > > + format = v4l2_subdev_state_get_format(state, 0);
> > > + mode = v4l2_find_nearest_size(supported_modes,
> > > + ARRAY_SIZE(supported_modes), width,
> > > + height, format->width, format->height);
> > > +
> > > + cci_write(os02g10->cci, OS02G10_REG_V_START, mode->y_start, &ret);
> > > + cci_write(os02g10->cci, OS02G10_REG_V_SIZE, mode->height, &ret);
> > > + cci_write(os02g10->cci, OS02G10_REG_V_SIZE_MIPI, mode->height, &ret);
> > > + cci_write(os02g10->cci, OS02G10_REG_H_START, mode->x_start, &ret);
> > > + cci_write(os02g10->cci, OS02G10_REG_H_SIZE, mode->width, &ret);
> > > + cci_write(os02g10->cci, OS02G10_REG_H_SIZE_MIPI, mode->width, &ret);
> > > +
> > > + return ret;
> >
> > Just "return 0" here, and remove the local variable.
>
> Could you clarify why this should return 0? The local ret is passed to all
> cci_write() calls so that any write error is propagated. Returning 0 here
> would appear to suppress those errors and always report success.
The code seems fine to me.
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2026-06-18 10:56 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-24 9:25 [PATCH v3 0/3] media: i2c: Add os02g10 camera sensor driver Elgin Perumbilly
2026-04-24 9:25 ` [PATCH v3 1/3] dt-bindings: media: i2c: Add os02g10 sensor Elgin Perumbilly
2026-04-25 9:43 ` Krzysztof Kozlowski
2026-06-12 9:35 ` Vladimir Zapolskiy
2026-04-24 9:25 ` [PATCH v3 2/3] media: i2c: add os02g10 image sensor driver Elgin Perumbilly
2026-06-12 10:12 ` Vladimir Zapolskiy
2026-06-18 6:22 ` Elgin Perumbilly
2026-06-18 10:56 ` sakari.ailus [this message]
2026-06-18 11:06 ` Vladimir Zapolskiy
2026-06-18 11:46 ` Laurent Pinchart
2026-06-18 11:43 ` Sakari Ailus
2026-06-18 12:27 ` Tarang Raval
2026-06-18 12:58 ` Laurent Pinchart
2026-06-18 13:01 ` Laurent Pinchart
2026-04-24 9:25 ` [PATCH v3 3/3] media: i2c: os02g10: implement crop handling with set_selection Elgin Perumbilly
2026-06-12 10:34 ` Vladimir Zapolskiy
2026-06-12 11:41 ` Tarang Raval
2026-06-12 13:16 ` Vladimir Zapolskiy
2026-06-12 14:20 ` Tarang Raval
2026-06-18 11:47 ` Sakari Ailus
2026-06-18 13:02 ` Laurent Pinchart
2026-06-18 13:36 ` Sakari Ailus
2026-06-20 4:08 ` Elgin Perumbilly
2026-06-30 9:12 ` Elgin Perumbilly
2026-04-24 12:14 ` [PATCH v3 0/3] media: i2c: Add os02g10 camera sensor driver Sakari Ailus
2026-04-24 13:28 ` Elgin Perumbilly
2026-04-25 9:42 ` Krzysztof Kozlowski
2026-05-21 5:15 ` Elgin Perumbilly
2026-06-11 7:39 ` Elgin Perumbilly
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=ajPO8cOS_jgJIcqD@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=bryan.odonoghue@linaro.org \
--cc=clamor95@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elgin.perumbilly@siliconsignals.io \
--cc=heimir.sverrisson@gmail.com \
--cc=himanshu.bhavani@siliconsignals.io \
--cc=hverkuil+cisco@kernel.org \
--cc=jingjing.xiong@intel.com \
--cc=johannes.goede@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=robh@kernel.org \
--cc=sylvain.petinot@foss.st.com \
--cc=tarang.raval@siliconsignals.io \
--cc=vladimir.zapolskiy@linaro.org \
/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