* [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data()
@ 2020-11-18 14:31 Grygorii Strashko
2020-11-19 9:19 ` Tony Lindgren
2020-11-30 16:39 ` Bartosz Golaszewski
0 siblings, 2 replies; 4+ messages in thread
From: Grygorii Strashko @ 2020-11-18 14:31 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski
Cc: linux-gpio, linux-kernel, linux-omap, Santosh Shilimkar,
Grygorii Strashko
The gpiochip_add_data() may return -EPROBE_DEFER which is not handled
properly by TI GPIO driver and causes unnecessary boot log messages.
Hence, add proper deferred probe handling with new dev_err_probe() API.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/gpio/gpio-omap.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index f7ceb2b11afc..41952bb818ad 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -1049,11 +1049,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
irq->first = irq_base;
ret = gpiochip_add_data(&bank->chip, bank);
- if (ret) {
- dev_err(bank->chip.parent,
- "Could not register gpio chip %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n");
ret = devm_request_irq(bank->chip.parent, bank->irq,
omap_gpio_irq_handler,
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data()
2020-11-18 14:31 [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data() Grygorii Strashko
@ 2020-11-19 9:19 ` Tony Lindgren
2020-11-30 10:33 ` Grygorii Strashko
2020-11-30 16:39 ` Bartosz Golaszewski
1 sibling, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2020-11-19 9:19 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio, linux-kernel,
linux-omap, Santosh Shilimkar
* Grygorii Strashko <grygorii.strashko@ti.com> [201118 14:33]:
> The gpiochip_add_data() may return -EPROBE_DEFER which is not handled
> properly by TI GPIO driver and causes unnecessary boot log messages.
>
> Hence, add proper deferred probe handling with new dev_err_probe() API.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data()
2020-11-19 9:19 ` Tony Lindgren
@ 2020-11-30 10:33 ` Grygorii Strashko
0 siblings, 0 replies; 4+ messages in thread
From: Grygorii Strashko @ 2020-11-30 10:33 UTC (permalink / raw)
To: Tony Lindgren
Cc: Linus Walleij, Bartosz Golaszewski, linux-gpio, linux-kernel,
linux-omap, Santosh Shilimkar
Hi All,
On 19/11/2020 11:19, Tony Lindgren wrote:
> * Grygorii Strashko <grygorii.strashko@ti.com> [201118 14:33]:
>> The gpiochip_add_data() may return -EPROBE_DEFER which is not handled
>> properly by TI GPIO driver and causes unnecessary boot log messages.
>>
>> Hence, add proper deferred probe handling with new dev_err_probe() API.
>>
>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>
> Acked-by: Tony Lindgren <tony@atomide.com>
>
Are there any comments? Could it be merged?
On am335 we no do see ~10 annoying error messages during boot as there now is
dependency from pinctrl on this platform.
--
Best regards,
grygorii
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data()
2020-11-18 14:31 [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data() Grygorii Strashko
2020-11-19 9:19 ` Tony Lindgren
@ 2020-11-30 16:39 ` Bartosz Golaszewski
1 sibling, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2020-11-30 16:39 UTC (permalink / raw)
To: Grygorii Strashko
Cc: Linus Walleij, linux-gpio, LKML, Linux-OMAP, Santosh Shilimkar
On Wed, Nov 18, 2020 at 3:31 PM Grygorii Strashko
<grygorii.strashko@ti.com> wrote:
>
> The gpiochip_add_data() may return -EPROBE_DEFER which is not handled
> properly by TI GPIO driver and causes unnecessary boot log messages.
>
> Hence, add proper deferred probe handling with new dev_err_probe() API.
>
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
> drivers/gpio/gpio-omap.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
> index f7ceb2b11afc..41952bb818ad 100644
> --- a/drivers/gpio/gpio-omap.c
> +++ b/drivers/gpio/gpio-omap.c
> @@ -1049,11 +1049,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc)
> irq->first = irq_base;
>
> ret = gpiochip_add_data(&bank->chip, bank);
> - if (ret) {
> - dev_err(bank->chip.parent,
> - "Could not register gpio chip %d\n", ret);
> - return ret;
> - }
> + if (ret)
> + return dev_err_probe(bank->chip.parent, ret, "Could not register gpio chip\n");
>
> ret = devm_request_irq(bank->chip.parent, bank->irq,
> omap_gpio_irq_handler,
> --
> 2.17.1
>
Now applied. Thanks!
Bartosz
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-30 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18 14:31 [PATCH] gpio: omap: handle deferred probe with dev_err_probe() for gpiochip_add_data() Grygorii Strashko
2020-11-19 9:19 ` Tony Lindgren
2020-11-30 10:33 ` Grygorii Strashko
2020-11-30 16:39 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).