Commit 851ec596 authored by Sean Cross's avatar Sean Cross Committed by Lee Jones

mfd: stmpe: Support gpio over irq under device tree

The stmpe_platform_data has a irq_over_gpio field, which allows the
system to read STMPE events whenever an IRQ occurs on a GPIO pin.
This patch adds the ability to configure this field and to use a GPIO
as an IRQ source for boards configuring the STMPE in device tree.
Signed-off-by: default avatarSean Cross <xobs@kosagi.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent bdaf6703
......@@ -1122,6 +1122,11 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata,
if (pdata->id < 0)
pdata->id = -1;
pdata->irq_gpio = of_get_named_gpio_flags(np, "irq-gpio", 0,
&pdata->irq_trigger);
if (gpio_is_valid(pdata->irq_gpio))
pdata->irq_over_gpio = 1;
else
pdata->irq_trigger = IRQF_TRIGGER_NONE;
of_property_read_u32(np, "st,autosleep-timeout",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment