* [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
@ 2024-12-19 9:39 Luca Ceresoli
2024-12-19 14:41 ` Bartosz Golaszewski
2024-12-20 13:42 ` Bartosz Golaszewski
0 siblings, 2 replies; 6+ messages in thread
From: Luca Ceresoli @ 2024-12-19 9:39 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski
Cc: Thomas Petazzoni, linux-gpio, linux-kernel, Luca Ceresoli
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;
---
base-commit: 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8
change-id: 20241219-pca953x-log-no-reset-gpio-f57060c93337
Best regards,
--
Luca Ceresoli <luca.ceresoli@bootlin.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
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
2024-12-20 13:42 ` Bartosz Golaszewski
1 sibling, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-12-19 14:41 UTC (permalink / raw)
To: Luca Ceresoli; +Cc: Linus Walleij, Thomas Petazzoni, linux-gpio, linux-kernel
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?
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
2024-12-19 14:41 ` Bartosz Golaszewski
@ 2024-12-19 15:38 ` Luca Ceresoli
2024-12-19 17:00 ` Bartosz Golaszewski
0 siblings, 1 reply; 6+ messages in thread
From: Luca Ceresoli @ 2024-12-19 15:38 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, Thomas Petazzoni, linux-gpio, linux-kernel,
Steve Longerbeam
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
2024-12-19 15:38 ` Luca Ceresoli
@ 2024-12-19 17:00 ` Bartosz Golaszewski
2024-12-19 18:02 ` Luca Ceresoli
0 siblings, 1 reply; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-12-19 17:00 UTC (permalink / raw)
To: Luca Ceresoli
Cc: Linus Walleij, Thomas Petazzoni, linux-gpio, linux-kernel,
Steve Longerbeam
On Thu, Dec 19, 2024 at 4:38 PM Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:
>
> >
> > Fixes: and Cc: stable tags?
>
> I haven't been considering my patch a fix but rather an improvement.
Ok, I'll pick it up as is then.
Bart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
2024-12-19 17:00 ` Bartosz Golaszewski
@ 2024-12-19 18:02 ` Luca Ceresoli
0 siblings, 0 replies; 6+ messages in thread
From: Luca Ceresoli @ 2024-12-19 18:02 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Linus Walleij, Thomas Petazzoni, linux-gpio, linux-kernel,
Steve Longerbeam
Hi Bartosz,
On Thu, 19 Dec 2024 18:00:09 +0100
Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> On Thu, Dec 19, 2024 at 4:38 PM Luca Ceresoli <luca.ceresoli@bootlin.com> wrote:
> >
> > >
> > > Fixes: and Cc: stable tags?
> >
> > I haven't been considering my patch a fix but rather an improvement.
>
> Ok, I'll pick it up as is then.
In case it's not too late:
s/dirver/driver/ in the commit message.
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] gpio: pca953x: log an error when failing to get the reset GPIO
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-20 13:42 ` Bartosz Golaszewski
1 sibling, 0 replies; 6+ messages in thread
From: Bartosz Golaszewski @ 2024-12-20 13:42 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Luca Ceresoli
Cc: Bartosz Golaszewski, Thomas Petazzoni, linux-gpio, linux-kernel
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Thu, 19 Dec 2024 10:39:46 +0100, Luca Ceresoli 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.
>
>
Applied, thanks!
[1/1] gpio: pca953x: log an error when failing to get the reset GPIO
commit: 7cef813a91c468253c80633891393478b9f2c966
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-12-20 13:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2024-12-19 17:00 ` Bartosz Golaszewski
2024-12-19 18:02 ` Luca Ceresoli
2024-12-20 13:42 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox