aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorBarry Song <Baohua.Song@csr.com>2014-01-11 03:48:43 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-01-15 03:10:00 -0500
commitb07ddcdcb28764d4deb26933d803cb38c370f01b (patch)
tree05934b58d08e12455735ea29f332900b6735f175 /drivers/pinctrl
parent8daeffb058f78deb0b0ef2cb67ef741c38788bf9 (diff)
pinctrl: sirf: put gpio interrupt pin into input status automatically
busses like i2c, spi and so on can parse the virq of their subnode automatically by irq_of_parse_and_map(). for example, i2c will do that in of_i2c_register_devices(). people can put hwirq number attached to a gpio controller in dts, and drivers can directly request the parsed virq. for example, for an i2c client as below, tangoc-ts@5c{ compatible = "pixcir,tangoc-ts"; interrupt-parent = <&gpio>; interrupts = <3 0>; reg = <0x5c>; }; in i2c client probe(), it will request_irq(client->irq, ...) without calling gpio_direction_input(). so here when we set irq type, we also put the pin to input direction. Signed-off-by: Barry Song <Baohua.Song@csr.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sirf/pinctrl-sirf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
index 53a3bc5ac2dd..b637f5ab022c 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -560,7 +560,7 @@ static int sirfsoc_gpio_irq_type(struct irq_data *d, unsigned type)
560 spin_lock_irqsave(&sgpio_lock, flags); 560 spin_lock_irqsave(&sgpio_lock, flags);
561 561
562 val = readl(bank->chip.regs + offset); 562 val = readl(bank->chip.regs + offset);
563 val &= ~SIRFSOC_GPIO_CTL_INTR_STS_MASK; 563 val &= ~(SIRFSOC_GPIO_CTL_INTR_STS_MASK | SIRFSOC_GPIO_CTL_OUT_EN_MASK);
564 564
565 switch (type) { 565 switch (type) {
566 case IRQ_TYPE_NONE: 566 case IRQ_TYPE_NONE: