aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorSean Cross <xobs@kosagi.com>2014-09-11 23:18:33 -0400
committerLee Jones <lee.jones@linaro.org>2014-09-26 03:23:53 -0400
commit851ec59614d8cd0d122319c32a5be0f8799d36be (patch)
tree2dc01154ee87fd169dfd282005b40db12895c97a /drivers/mfd
parentbdaf67030cbab21a91fd2d6b1771cf336a0dd092 (diff)
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: Sean Cross <xobs@kosagi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/stmpe.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mfd/stmpe.c b/drivers/mfd/stmpe.c
index f9d46f035bb1..e2f9df1c0c36 100644
--- a/drivers/mfd/stmpe.c
+++ b/drivers/mfd/stmpe.c
@@ -1122,7 +1122,12 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata,
1122 if (pdata->id < 0) 1122 if (pdata->id < 0)
1123 pdata->id = -1; 1123 pdata->id = -1;
1124 1124
1125 pdata->irq_trigger = IRQF_TRIGGER_NONE; 1125 pdata->irq_gpio = of_get_named_gpio_flags(np, "irq-gpio", 0,
1126 &pdata->irq_trigger);
1127 if (gpio_is_valid(pdata->irq_gpio))
1128 pdata->irq_over_gpio = 1;
1129 else
1130 pdata->irq_trigger = IRQF_TRIGGER_NONE;
1126 1131
1127 of_property_read_u32(np, "st,autosleep-timeout", 1132 of_property_read_u32(np, "st,autosleep-timeout",
1128 &pdata->autosleep_timeout); 1133 &pdata->autosleep_timeout);