All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpiolib: probe deferral error reporting
@ 2018-07-20  7:54 Marcel Ziswiler
  2018-07-29 20:49 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Ziswiler @ 2018-07-20  7:54 UTC (permalink / raw)
  To: linux-gpio, linux-tegra; +Cc: Marcel Ziswiler, Linus Walleij, linux-kernel

From: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Actually report the error code from devm_regulator_get() which may as
well just be a probe deferral.

This is e.g. what one gets upon booting a Colibri T20:

gpiochip_add_data_with_key: GPIOs 0..223 (tegra-gpio) failed to register

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

---

 drivers/gpio/gpiolib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 2e2a6f8db405..40c65eb1d97b 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1408,9 +1408,9 @@ int gpiochip_add_data_with_key(struct gpio_chip *chip, void *data,
 err_free_gdev:
 	ida_simple_remove(&gpio_ida, gdev->id);
 	/* failures here can mean systems won't boot... */
-	pr_err("%s: GPIOs %d..%d (%s) failed to register\n", __func__,
+	pr_err("%s: GPIOs %d..%d (%s) failed to register, %d\n", __func__,
 	       gdev->base, gdev->base + gdev->ngpio - 1,
-	       chip->label ? : "generic");
+	       chip->label ? : "generic", status);
 	kfree(gdev);
 	return status;
 }
-- 
2.14.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gpiolib: probe deferral error reporting
  2018-07-20  7:54 [PATCH] gpiolib: probe deferral error reporting Marcel Ziswiler
@ 2018-07-29 20:49 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2018-07-29 20:49 UTC (permalink / raw)
  To: Marcel Ziswiler
  Cc: open list:GPIO SUBSYSTEM, linux-tegra, Marcel Ziswiler, linux-kernel

On Fri, Jul 20, 2018 at 9:54 AM Marcel Ziswiler <marcel@ziswiler.com> wrote:

> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> Actually report the error code from devm_regulator_get() which may as
> well just be a probe deferral.
>
> This is e.g. what one gets upon booting a Colibri T20:
>
> gpiochip_add_data_with_key: GPIOs 0..223 (tegra-gpio) failed to register
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>

Makes perfect sense.
Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-29 20:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-20  7:54 [PATCH] gpiolib: probe deferral error reporting Marcel Ziswiler
2018-07-29 20:49 ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.