* [RESEND PATCH] mfd: stmpe: honor gpio interrupt probe deferral
@ 2018-08-14 13:01 Marcel Ziswiler
2018-09-10 14:03 ` Lee Jones
0 siblings, 1 reply; 2+ messages in thread
From: Marcel Ziswiler @ 2018-08-14 13:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Marcel Ziswiler, Lee Jones
From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Actually honor probe deferral in trying to get the GPIO interrupt as
of_get_named_gpio_flags() in stmpe_of_probe() may as well just do so.
Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
---
drivers/mfd/stmpe.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 566caca4efd8..4d6ffd3ef398 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1331,6 +1331,8 @@ int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
return -ENOMEM;
stmpe_of_probe(pdata, np);
+ if (-EPROBE_DEFER == pdata->irq_gpio)
+ return -EPROBE_DEFER;
if (of_find_property(np, "interrupts", NULL) == NULL)
ci->irq = -1;
--
2.14.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RESEND PATCH] mfd: stmpe: honor gpio interrupt probe deferral
2018-08-14 13:01 [RESEND PATCH] mfd: stmpe: honor gpio interrupt probe deferral Marcel Ziswiler
@ 2018-09-10 14:03 ` Lee Jones
0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2018-09-10 14:03 UTC (permalink / raw)
To: Marcel Ziswiler; +Cc: linux-kernel, Marcel Ziswiler
On Tue, 14 Aug 2018, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> Actually honor probe deferral in trying to get the GPIO interrupt as
> of_get_named_gpio_flags() in stmpe_of_probe() may as well just do so.
>
> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
>
> ---
>
> drivers/mfd/stmpe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
> index 566caca4efd8..4d6ffd3ef398 100644
> --- a/drivers/mfd/stmpe.c
> +++ b/drivers/mfd/stmpe.c
> @@ -1331,6 +1331,8 @@ int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum)
> return -ENOMEM;
>
> stmpe_of_probe(pdata, np);
> + if (-EPROBE_DEFER == pdata->irq_gpio)
> + return -EPROBE_DEFER;
EPROBE_DEFER usually means "stop what you're doing and return", rather
than "do a few more things, then return". With that in mind, I would
rather you convert stmpe_of_probe() to return and int containing the
appropriate error as soon as it is detected.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-09-10 14:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14 13:01 [RESEND PATCH] mfd: stmpe: honor gpio interrupt probe deferral Marcel Ziswiler
2018-09-10 14:03 ` Lee Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox