[PATCH v6 3/5] media: platform: mediatek: isp_30: add mediatek ISP3.0 sensor interface

Laurent Pinchart laurent.pinchart at ideasonboard.com
Wed Jul 31 06:51:03 PDT 2024


On Wed, Jul 31, 2024 at 03:33:59PM +0200, Julien Stephan wrote:
> Le mar. 30 juil. 2024 à 15:29, Laurent Pinchart a écrit :
> [...]
> > > +             mtk_seninf_update(priv, SENINF_TOP_PHY_SENINF_CTL_CSI0, DPHY_MODE, 0 /* 4D1C*/);
> >
> > As this is a V4L2 driver, I'm pretty sure someone will ask for
> >
> >                 mtk_seninf_update(priv, SENINF_TOP_PHY_SENINF_CTL_CSI0,
> >                                   DPHY_MODE, 0 /* 4D1C*/);
> >
> > I wouldn't care too much about going slightly over 80 characters, but
> > getting close to 100 where lines could be wrapped without hindering
> > readability will likely upset some people. Same in other places where
> > applicable.
> 
> Hi Laurent,
> 
> On an early version of this series, Angelo asked me to un-wrap lines
> that can fit into 100 chars...
> Both are fine for me, we just need to agree on something here ....

For new V4L2 drivers I have a preference for a soft 80 columns limit,
but I don't insist too much usually. Some other V4L2 core developers do
insist more.

> [...]
> > > +     /* Configure timestamp */
> > > +     writel(SENINF_TIMESTAMP_STEP, input->base + SENINF_TG1_TM_STP);
> >
> > Can we have a mtk_seninf_input_write(), the same way we have
> > mtk_seninf_mux_write() ? Same for writes to priv->base below, with a
> > mtk_seninf_write() inline function.
> 
> ... and here :) In an early review Angelo also  asked me to remove
> these accessors.
> 
> I can add them back and reduce line chars if needed.

With my V4L2 hat, trying to achieve some level of consistency between
drivers in the subsystem, I'd like to have wrappers around writel() and
readl(). Angelo, I hope you don't mind my overruling you in this case.

-- 
Regards,

Laurent Pinchart



More information about the Linux-mediatek mailing list