Skip to content

Commit

Permalink
mfd: stmpe: DT: Add stmpe-i2c dt alias to get id device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Gabriel Fernandez authored and Samuel Ortiz committed Apr 5, 2013
1 parent a200e32 commit 408a3fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mfd/stmpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 408a3fa

Please sign in to comment.