Re: [RESEND PATCH] mfd: stmpe: honor gpio interrupt probe deferral
From: Lee Jones
Date: Mon Sep 10 2018 - 10:03:47 EST
On Tue, 14 Aug 2018, Marcel Ziswiler wrote:
> From: Marcel Ziswiler <marcel.ziswiler@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>
>
> ---
>
> 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