1. 28 Jul, 2015 2 commits
    • Tomeu Vizoso's avatar
      gpio: defer probe if pinctrl cannot be found · 28355f81
      Tomeu Vizoso authored
      When an OF node has a pin range for its GPIOs, return -EPROBE_DEFER if
      the pin controller isn't available.
      
      Otherwise, the GPIO range wouldn't be set at all unless the pin
      controller probed always before the GPIO chip.
      
      With this change, the probe of the GPIO chip will be deferred and will
      be retried at a later point, hopefully once the pin controller has been
      registered and probed already.
      Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      28355f81
    • Rob Herring's avatar
      gpio: kill off set_irq_flags usage · 23393d49
      Rob Herring authored
      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: default avatarRob Herring <robh@kernel.org>
      Cc: Michael Hennerich <michael.hennerich@analog.com>
      Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Ray Jui <rjui@broadcom.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Thierry Reding <thierry.reding@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      Cc: bcm-kernel-feedback-list@broadcom.com
      Cc: linux-tegra@vger.kernel.org
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      23393d49
  2. 27 Jul, 2015 10 commits
  3. 21 Jul, 2015 1 commit
  4. 17 Jul, 2015 4 commits
  5. 16 Jul, 2015 9 commits
  6. 15 Jul, 2015 9 commits
  7. 14 Jul, 2015 5 commits
    • Thomas Gleixner's avatar
      gpio/davinci: Fix race in installing chained irq handler · bdac2b6d
      Thomas Gleixner authored
      Fix a race where a pending interrupt could be received and the handler
      called before the handler's data has been setup, by converting to
      irq_set_chained_handler_and_data().
          
      Search and conversion was done with coccinelle.
      Reported-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      bdac2b6d
    • Thomas Gleixner's avatar
      gpio/davinci: Avoid redundant lookup of irq_data · 1765d671
      Thomas Gleixner authored
      It's pretty silly to do
      
           void *cd = irq_get_chip_data(irq_data->irq);
      
      because that results in cd = irq_data->chip_data, but goes through a
      redundant lookup of the irq_data. Use irq_data directly.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: linux-gpio@vger.kernel.org
      1765d671
    • Thomas Gleixner's avatar
      gpio/msm-v2: Avoid redundant lookup of irq_data · 789f9dab
      Thomas Gleixner authored
      It's pretty silly to do
      
           irq_data *d = irq_get_irq_data(irq_data->irq);
      
      because that results in d = irq_data, but goes through a lookup of the
      irq_data. Use irq_data directly.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: linux-gpio@vger.kernel.org
      789f9dab
    • Thomas Gleixner's avatar
      gpio/sa1100: Prepare sa1100_gpio_handler for irq argument removal · 2951a799
      Thomas Gleixner authored
      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: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      2951a799
    • Thomas Gleixner's avatar
      gpio/mvebu: Prepare mvebu_gpio_irq_handler for irq argument removal · 364ea44b
      Thomas Gleixner authored
      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: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
      364ea44b