This patch augments the STMP driver to read the device id
from the stmpe-i2c dt alias if present.
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>
 {
        struct device_node *child;
 
-       pdata->id = -1;
+       pdata->id = of_alias_get_id(np, "stmpe-i2c");
+       if (pdata->id < 0)
+               pdata->id = -1;
+
        pdata->irq_trigger = IRQF_TRIGGER_NONE;
 
        of_property_read_u32(np, "st,autosleep-timeout",