mfd: stmpe: DT: Enable no-irq mode configuration
authorGabriel Fernandez <gabriel.fernandez@stericsson.com>
Fri, 1 Mar 2013 12:07:16 +0000 (13:07 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 5 Apr 2013 16:05:54 +0000 (18:05 +0200)
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@lists.ozlabs.org
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/stmpe.c

index 4b11202..e550dcb 100644 (file)
@@ -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);