Re: [PATCH 1/2] backlight: hx8357: switch to using gpiod API

From: Daniel Thompson
Date: Tue Feb 07 2023 - 11:05:05 EST


On Mon, Feb 06, 2023 at 08:15:56PM -0800, Dmitry Torokhov wrote:
> On Mon, Feb 06, 2023 at 11:35:32AM +0000, Daniel Thompson wrote:
> > On Tue, Jan 31, 2023 at 02:57:06PM -0800, Dmitry Torokhov wrote:
> > > + dev_info(&spi->dev, "im gpio[%d] is not here yet, deferring the probe\n",
> > > + i);
> > > + } else {
> > > + dev_err(&spi->dev, "failed to request im gpio[%d]: %d\n",
> > > + i, ret);
> > > }
> >
> > These last two clauses should be updated to return dev_err_probe(...)
> > instead.
> >
> > With that change:
> > Reviewed-by: Daniel Thompson <daniel.thompson@xxxxxxxxxx>
>
> So you want to actually suppress the deferral message unless debug
> printks are enabled? So you want this to read:
>
>
> if (ret) {
> if (ret == -ENOENT) {
> if (i == 0)
> break;
>
> dev_err(&spi->dev, "Missing im gpios[%d]\n", i);
> return -EINVAL;
> }
>
> return dev_err_probe(&spi->dev, ret,
> "failed to request im gpio[%d]\n", i);
> }
>
> Did I get it right?

LGTM.


Daniel.