[PATCH v3 4/4] media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver
Marco Felsch
m.felsch at pengutronix.de
Fri Sep 23 07:30:13 PDT 2022
On 22-09-23, Laurent Pinchart wrote:
> Hi Marco,
>
> On Fri, Sep 23, 2022 at 11:27:26AM +0200, Marco Felsch wrote:
...
> > > > +static int tc358746_write(struct tc358746 *tc358746, u32 reg, u32 val)
> > > > +{
> > > > + size_t count;
> > > > + int err;
> > > > +
> > > > + /* 32-bit registers starting from CLW_DPHYCONTTX */
> > > > + count = reg < CLW_DPHYCONTTX_REG ? 1 : 2;
> > > > +
> > > > + err = regmap_bulk_write(tc358746->regmap, reg, &val, count);
> > > > + if (err)
> > > > + dev_dbg(tc358746->sd.dev,
> > > > + "Failed to write reg:0x%04x val:0x%04x\n", reg, val);
> > >
> > > I'm not sure if the value is relevant here, but I'd add the error, it's
> > > useful to know what kind of I2C issue occurred. Same for read().
> >
> > Yeah.. I'm not sure, since you told me to not flood the kernel log. If
> > someone recognised error while probing or streaming the debug will be
> > turned on anyways. However, I will make it a dev_err() since this
> > shouldnt appear normally, you're right.
>
> Sorry, I meant printing the value of the error code in the message, the
> err variable. dev_err() is probably good too actually, as this isn't
> meant to happen.
Sorry that was my fault, I misread your comment.. Anyway since we agree
with dev_err() and I added the err value into the message, everything is
fine :)
Regards,
Marco
More information about the linux-phy
mailing list