02 Jul, 2018

1 commit


24 Mar, 2017

3 commits


08 Sep, 2016

1 commit

  • ucb1x00 has used IRQ probing since it's dawn to find the GPIO interrupt
    that it's connected to. However, commit 23393d49fb75 ("gpio: kill off
    set_irq_flags usage") broke this by disabling IRQ probing on GPIO
    interrupts. Fix this.

    Fixes: 23393d49fb75 ("gpio: kill off set_irq_flags usage")
    Signed-off-by: Russell King
    Signed-off-by: Linus Walleij

    Russell King
     

05 Jan, 2016

1 commit


27 Dec, 2015

1 commit

  • As we want gpio_chip .get() calls to be able to return negative
    error codes and propagate to drivers, we need to go over all
    drivers and make sure their return values are clamped to [0,1].
    We do this by using the ret = !!(val) design pattern.

    Cc: Russell King
    Cc: Dmitry Eremin-Solenikov
    Cc: Kristoffer Ericson
    Signed-off-by: Linus Walleij

    Linus Walleij
     

16 Sep, 2015

1 commit

  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     

28 Jul, 2015

1 commit

  • set_irq_flags is ARM specific with custom flags which have genirq
    equivalents. Convert drivers to use the genirq interfaces directly, so we
    can kill off set_irq_flags. The translation of flags is as follows:

    IRQF_VALID -> !IRQ_NOREQUEST
    IRQF_PROBE -> !IRQ_NOPROBE
    IRQF_NOAUTOEN -> IRQ_NOAUTOEN

    For IRQs managed by an irqdomain, the irqdomain core code handles clearing
    and setting IRQ_NOREQUEST already, so there is no need to do this in
    .map() functions and we can simply remove the set_irq_flags calls. Some
    users also modify IRQ_NOPROBE and this has been maintained although it
    is not clear that is really needed as most platforms don't use probing.
    There appears to be a great deal of blind copy and paste of this code.

    Signed-off-by: Rob Herring
    Cc: Michael Hennerich
    Acked-by: Linus Walleij
    Cc: Alexandre Courbot
    Cc: Ray Jui
    Cc: Stephen Warren
    Cc: Thierry Reding
    Cc: linux-gpio@vger.kernel.org
    Cc: bcm-kernel-feedback-list@broadcom.com
    Cc: linux-tegra@vger.kernel.org
    Signed-off-by: Linus Walleij

    Rob Herring
     

14 Jul, 2015

1 commit

  • The irq argument of most interrupt flow handlers is unused or merily
    used instead of a local variable. The handlers which need the irq
    argument can retrieve the irq number from the irq descriptor.

    Search and update was done with coccinelle and the invaluable help of
    Julia Lawall.

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu
    Cc: Linus Walleij
    Cc: Alexandre Courbot
    Cc: linux-gpio@vger.kernel.org

    Thomas Gleixner
     

06 May, 2015

1 commit


29 Jan, 2015

2 commits

  • As a part of driver consolidation, move GPIO-related IRQ code to
    drivers/gpio/gpio-sa1100.c. The code does not use GPIOLIB_IRQCHIP (yet),
    because sa1100 does not have a device for gpios, which is a requirement
    for GPIOLIB_IRQCHIP. This will be the next step.

    Signed-off-by: Dmitry Eremin-Solenikov
    Tested-by: Linus Walleij
    Signed-off-by: Russell King

    Dmitry Eremin-Solenikov
     
  • Low GPIO pins use an interrupt in SC interrupts space. However it's
    possible to handle them as if all the GPIO interrupts are instead tied
    to single GPIO handler, which later decodes GEDR register and
    chain-calls next IRQ handler. So split first 11 interrupts into system
    part (IRQ_GPIO0_SC - IRQ_GPIO10_SC) which work exactly like the rest of
    system controller interrupts and real GPIO interrupts
    (IRQ_GPIO0..IRQ_GPIO10). A single handler sa1100_gpio_handler then
    decodes and calls next handler.

    Signed-off-by: Dmitry Eremin-Solenikov
    Tested-by: Linus Walleij
    Signed-off-by: Russell King

    Dmitry Eremin-Solenikov
     

29 Oct, 2013

1 commit

  • The SA1100 was implementing its own variants of gpio_get_value()
    and gpio_set_value() and only selectively falling back to
    gpiolib for extended (EGPIO) handling. However the driver in
    gpio/gpio-sa1100.c already handles the same functionality for
    these lines, yet remain unused.

    The only upside would be things like a timing-critical hotpath
    on bit-banged GPIO, but that kind of things does not seem to
    happen on these GPIOs, so it is not worth having the extra
    complexity.

    Tested with some buttons on the Compaq iPAQ H3630.

    Cc: Kristoffer Ericson
    Signed-off-by: Linus Walleij
    Signed-off-by: Russell King

    Linus Walleij
     

26 Mar, 2012

1 commit


14 Jan, 2012

1 commit

  • The existing gpio_to_irq() implementation on sa1100 only translates
    validly for internal GPIOs. Since this sub-arch enables GPIOLIB
    support, this results in buggy translations for non-internal GPIOs.

    Get rid of the private gpio_to_irq() implementation, replacing it
    with the .to_irq method in the sa1100 gpio chip instead.

    Signed-off-by: Russell King
    Acked-by: Linus Walleij
    Signed-off-by: Grant Likely

    Russell King
     

22 Aug, 2011

1 commit