Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 408a3fa8 authored by Gabriel Fernandez's avatar Gabriel Fernandez Committed by Samuel Ortiz
Browse files

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: default avatarGabriel Fernandez <gabriel.fernandez@stericsson.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent a200e320
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1015,7 +1015,10 @@ void stmpe_of_probe(struct stmpe_platform_data *pdata, struct device_node *np)
{
	struct device_node *child;

	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",