[PATCH 1/2] mfd: stmpe: DT: Enable no-irq mode configuration
Linus Walleij
linus.walleij at stericsson.com
Fri Mar 1 23:07:16 EST 2013
From: Gabriel Fernandez <gabriel.fernandez at stericsson.com>
If there is no interrupt property into stmpe node
then activate the no-irq mode by setting the irq
value to -1.
Cc: devicetree-discuss at lists.ozlabs.org
Signed-off-by: Gabriel Fernandez <gabriel.fernandez at stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
---
drivers/mfd/stmpe.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index 4b11202..e550dcb 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1057,6 +1057,9 @@ int stmpe_probe(struct stmpe_client_info *ci, int partnum)
return -ENOMEM;
stmpe_of_probe(pdata, np);
+
+ if (of_find_property(np, "interrupts", NULL) == NULL)
+ ci->irq = -1;
}
stmpe = devm_kzalloc(ci->dev, sizeof(struct stmpe), GFP_KERNEL);
--
1.7.11.3
More information about the devicetree-discuss
mailing list