From: Gabriel Fernandez Date: Fri, 1 Mar 2013 12:07:26 +0000 (+0100) Subject: mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=408a3fa867be13844af13bcbba25e70232fd99e5;p=linux-beck.git mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device 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 Signed-off-by: Linus Walleij Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c index e550dcb1d394..bc8587777993 100644 --- a/drivers/mfd/stmpe.c +++ b/drivers/mfd/stmpe.c @@ -1015,7 +1015,10 @@ void stmpe_of_probe(struct stmpe_platform_data *pdata, struct device_node *np) { 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",