Re: [PATCH v15 3/3] media: i2c: Add support for alvium camera

From: Tommaso Merciai
Date: Tue Dec 12 2023 - 07:17:54 EST


Hi Sakari,
Just a clarification about the following warnings:

Fixed on my side with:

CHECK: Assignment operator '=' should be on the previous line

- alvium->is_mipi_fmt_avail[ALVIUM_BIT_YUV420_8_LEG]
- = avail_fmt->yuv420_8_leg;
+ alvium->is_mipi_fmt_avail[ALVIUM_BIT_YUV420_8_LEG] =
+ avail_fmt->yuv420_8_leg;

CHECK: line length of 81 exceeds 80 columns
#1085: FILE: drivers/media/i2c/alvium-csi2.c:1085:
+ if (!alvium->is_mipi_fmt_avail[alvium_csi2_fmts[fmt].fmt_av_bit])

CHECK: line length of 81 exceeds 80 columns
#1102: FILE: drivers/media/i2c/alvium-csi2.c:1102:
+ if (!alvium->is_mipi_fmt_avail[alvium_csi2_fmts[fmt].fmt_av_bit])


Fixed on my side with:

/* Create the alvium_csi2 fmt array from formats available */
for (fmt = 0; fmt < ALVIUM_NUM_SUPP_MIPI_DATA_FMT; fmt++) {
- if (!alvium->is_mipi_fmt_avail[alvium_csi2_fmts[fmt].fmt_av_bit])
+ if (!alvium->is_mipi_fmt_avail[alvium_csi2_fmts[fmt]
+ .fmt_av_bit])
continue;

Can be ok for you?
If yes I'm going to prepare the patch on top of your media_tree/master
branch.

Thanks & Regards,
Tommaso

On Tue, Dec 12, 2023 at 11:47:52AM +0000, Sakari Ailus wrote:
> Hi Tommaso,
>
> On Tue, Dec 12, 2023 at 12:44:46PM +0100, Tommaso Merciai wrote:
> > Hi Sakari,
> >
> > On Tue, Dec 12, 2023 at 11:38:42AM +0000, Sakari Ailus wrote:
> > > Hi Tommaso,
> > >
> > > On Mon, Dec 04, 2023 at 10:47:16AM +0100, Tommaso Merciai wrote:
> > > > The Alvium camera is shipped with sensor + isp in the same housing.
> > > > The camera can be equipped with one out of various sensor and abstract
> > > > the user from this. Camera is connected via MIPI CSI-2.
> > > >
> > > > Most of the camera module features are supported, with the main exception
> > > > being fw update.
> > > >
> > > > The driver provides all mandatory, optional and recommended V4L2 controls
> > > > for maximum compatibility with libcamera
> > > >
> > > > References:
> > > > - https://www.alliedvision.com/en/products/embedded-vision-solutions
> > > >
> > > > Signed-off-by: Tommaso Merciai <tomm.merciai@xxxxxxxxx>
> > >
> > > Could you run
> > >
> > > ./scripts/checkpatch.pl --strict --max-line-length=80
> > >
> > > and address the issues in a patch on top of this set?
> > >
> >
> > Yes ofc.
> > You need also the following?
> >
> > --- a/drivers/media/i2c/alvium-csi2.c
> > +++ b/drivers/media/i2c/alvium-csi2.c
> > @@ -2426,8 +2426,8 @@ static int alvium_probe(struct i2c_client *client)
> > goto err_powerdown;
> >
> > if (!alvium_is_alive(alvium)) {
> > - dev_err_probe(dev, ret, "Device detection failed\n");
> > ret = -ENODEV;
> > + dev_err_probe(dev, ret, "Device detection failed\n");
> > goto err_powerdown;
> > }
> >
> > Let me know. Thanks for your work.
>
> Thank you, but I've already addressed that in my tree.
>
> --
> Sakari Ailus