Linux GPIO subsystem development
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steve Longerbeam <slongerbeam@gmail.com>
Subject: Re: [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
Date: Thu, 19 Dec 2024 16:38:02 +0100	[thread overview]
Message-ID: <20241219163802.01a6a7b4@booty> (raw)
In-Reply-To: <CAMRc=Mf7=9N1Wo642XnGJ+nzqBY8N3D_cHb3TnsG93y+KTqBKQ@mail.gmail.com>

Hi Bartosz,

+Cc: Steve (original author of the changed lines)

On Thu, 19 Dec 2024 15:41:45 +0100
Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> On Thu, Dec 19, 2024 at 10:39 AM Luca Ceresoli
> <luca.ceresoli@bootlin.com> wrote:
> >
> > When the dirver fails getting this GPIO, it fails silently. Log an error
> > message to make debugging a lot easier by just reading dmesg.
> >
> > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
> > ---
> >  drivers/gpio/gpio-pca953x.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
> > index 272febc3230e90baf370811f498383b9fb12cc6f..be4c9981ebc404ad5c1e1b0ba9f9f948122de462 100644
> > --- a/drivers/gpio/gpio-pca953x.c
> > +++ b/drivers/gpio/gpio-pca953x.c
> > @@ -1088,7 +1088,8 @@ static int pca953x_probe(struct i2c_client *client)
> >                  */
> >                 reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
> >                 if (IS_ERR(reset_gpio))
> > -                       return PTR_ERR(reset_gpio);
> > +                       return dev_err_probe(dev, PTR_ERR(reset_gpio),
> > +                                            "Failed to get reset gpio\n");
> >         }
> >
> >         chip->client = client;
> >
> > ---  
> 
> Fixes: and Cc: stable tags?

I haven't been considering my patch a fix but rather an improvement.
However in case if you think it should be considered a bugfix, then
this should be the fixes line:

Fixes: 054ccdef8b28 ("gpio: pca953x: Add optional reset gpio control")

Luca

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  reply	other threads:[~2024-12-19 15:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19  9:39 [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO Luca Ceresoli
2024-12-19 14:41 ` Bartosz Golaszewski
2024-12-19 15:38   ` Luca Ceresoli [this message]
2024-12-19 17:00     ` Bartosz Golaszewski
2024-12-19 18:02       ` Luca Ceresoli
2024-12-20 13:42 ` Bartosz Golaszewski

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=20241219163802.01a6a7b4@booty \
    --to=luca.ceresoli@bootlin.com \
    --cc=brgl@bgdev.pl \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slongerbeam@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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