Skip to contentSkip to conversation

mfd: stmpe: honor gpio interrupt probe deferral

PATCH RESEND In review Marcel Ziswiler 2 participants 2 messages Aug 14, 2018 – Sep 10, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 mfd: stmpe: honor gpio interrupt probe deferral

From: Marcel Ziswiler <[email protected]>

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.

---

 drivers/mfd/stmpe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/stmpe.c +2 -0
index 566caca4efd8..4d6ffd3ef398 100644
@@ -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;
Signature · 1 line
2.14.4
#1 lore raw
Quoted 17 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

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.

---

 drivers/mfd/stmpe.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/mfd/stmpe.c +0 -0
index 566caca4efd8..4d6ffd3ef398 100644

drivers/mfd/stmpe.c int stmpe_probe(struct stmpe_client_info *ci, enum stmpe_partnum partnum) · line 1335

Quoted 5 lines
drivers/mfd/stmpe.c +2 -0
@@ -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.

Signature · 4 lines
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog