Add irq_over_gpio DT support to STMPE
Subsystems (3)
v2 cover Add irq_over_gpio DT support to STMPE
These patches add support for using a GPIO as an IRQ source for the STMPE module when configured using device tree.
Changes since v1:
- Split actual patch and Documentation into two parts
Sean Cross (2):
mfd: stmpe: support gpio over irq under device tree
mfd: stmpe: Document DT binding for irq_over_gpio
Documentation/devicetree/bindings/mfd/stmpe.txt | 1 + drivers/mfd/stmpe.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.0
PATCH v2 1/2 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.
--- drivers/mfd/stmpe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/mfd/stmpe.c +6 -1
@@ -1122,7 +1122,12 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata,if (pdata->id <0 ) pdata->id =-1 ; - pdata->irq_trigger =IRQF_TRIGGER_NONE ; + 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" , &pdata->autosleep_timeout);
Signature · 1 line
2.1.0
Lee Jones
AppliedRe: [PATCH v2 1/2] mfd: stmpe: support gpio over irq under device tree
Quoted 9 lines · Sean Cross
The
stmpe_platform_datahas airq_over_gpiofield, 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 <[email protected]>--- drivers/mfd/stmpe.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Applied, thanks.
Quoted 18 lines
drivers/mfd/stmpe.c +6
-1@@ -1122,7 +1122,12 @@ static void stmpe_of_probe(struct stmpe_platform_data *pdata,if (pdata->id <0 ) pdata->id =-1 ; - pdata->irq_trigger =IRQF_TRIGGER_NONE ; + 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" , &pdata->autosleep_timeout);
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog
PATCH v2 2/2 mfd: stmpe: Document DT binding for irq_over_gpio
In reply to Sean CrossSTMPE now supports using a GPIO as an IRQ source. Document the device tree binding for this option.
--- Documentation/devicetree/bindings/mfd/stmpe.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/mfd/stmpe.txt +1 -0
@@ -13,6 +13,7 @@ Optional properties: - interrupt-parent : Specifies which IRQ controller we're connected to - wakeup-source : Marks the input device as wakable - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024 + - irq-gpio : If present, which GPIO to use for event IRQ Example:
Signature · 1 line
2.1.0
Lee Jones
AppliedRe: [PATCH v2 2/2] mfd: stmpe: Document DT binding for irq_over_gpio
Quoted 7 lines · Sean Cross
STMPE now supports using a GPIO as an IRQ source. Document the device tree binding for this option.
Signed-off-by Sean Cross <[email protected]>--- Documentation/devicetree/bindings/mfd/stmpe.txt | 1 + 1 file changed, 1 insertion(+)
Applied, thanks.
Quoted 12 lines
Documentation/devicetree/bindings/mfd/stmpe.txt +1
-0@@ -13,6 +13,7 @@ Optional properties: - interrupt-parent : Specifies which IRQ controller we're connected to - wakeup-source : Marks the input device as wakable - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128, 256, 512 and 1024 + - irq-gpio : If present, which GPIO to use for event IRQ Example:
Signature · 4 lines
Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog