1. 23 5月, 2017 12 次提交
  2. 17 3月, 2017 1 次提交
  3. 30 1月, 2017 1 次提交
  4. 25 11月, 2016 1 次提交
    • L
      gpio: simplify adding threaded interrupts · d245b3f9
      Linus Walleij 提交于
      This tries to simplify the use of CONFIG_GPIOLIB_IRQCHIP when
      using threaded interrupts: add a new call
      gpiochip_irqchip_add_nested() to indicate that we're dealing
      with a nested rather than a chained irqchip, then create a
      separate gpiochip_set_nested_irqchip() to mirror
      the gpiochip_set_chained_irqchip() call to connect the
      parent and child interrupts.
      
      In the nested case gpiochip_set_nested_irqchip() does nothing
      more than call irq_set_parent() on each valid child interrupt,
      which has little semantic effect in the kernel, but this is
      probably still formally correct.
      
      Update all drivers using nested interrupts to use
      gpiochip_irqchip_add_nested() so we can now see clearly
      which these users are.
      
      The DLN2 driver can drop its specific hack with
      .irq_not_threaded as we now recognize whether a chip is
      threaded or not from its use of gpiochip_irqchip_add_nested()
      signature rather than from inspecting .can_sleep.
      
      We rename the .irq_parent to .irq_chained_parent since this
      parent IRQ is only really kept around for the chained
      interrupt handlers.
      
      Cc: Lars Poeschel <poeschel@lemonage.de>
      Cc: Octavian Purdila <octavian.purdila@intel.com>
      Cc: Daniel Baluta <daniel.baluta@intel.com>
      Cc: Bin Gao <bin.gao@linux.intel.com>
      Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
      Cc: Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>
      Cc: Semen Protsenko <semen.protsenko@globallogic.com>
      Cc: Alexander Stein <alexander.stein@systec-electronic.com>
      Cc: Phil Reid <preid@electromag.com.au>
      Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      d245b3f9
  5. 08 9月, 2016 1 次提交
  6. 31 3月, 2016 1 次提交
  7. 30 3月, 2016 2 次提交
  8. 16 3月, 2016 1 次提交
  9. 09 3月, 2016 1 次提交
    • P
      gpio: mcp23s08: Add support for mcp23s18 · 28c5a41e
      Phil Reid 提交于
      This patch adds support for the mcp23s18 which is very similar to
      the mcp23s17. A couple of control bits are not the same.
      Notable IOCON_HAEN (s17 only) & IOCON_INTCC. Which can be ignored.
      
      Patch changes the following:
      - Add mcp23s18 types.
      - Always set mirror bit if the dts defines mcp23s18. regardless of type.
        Mirror bit is ignored on 8 bit devices anyway.
      - In mcp23s08_probe use chip.ngpio instead of logic based on type
        to determine number of gpio lins to increment by. This is set
        appropiately by the call to mcp23s08_probe_one.
      - Add mcp23s18 to device tree documentation.
      - Remove statement that irqs don't work for spi. They do.
        Tested with mcp23s18.
      Signed-off-by: NPhil Reid <preid@electromag.com.au>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      28c5a41e
  10. 16 2月, 2016 1 次提交
  11. 05 1月, 2016 1 次提交
  12. 19 11月, 2015 1 次提交
    • L
      gpio: change member .dev to .parent · 58383c78
      Linus Walleij 提交于
      The name .dev in a struct is normally reserved for a struct device
      that is let us say a superclass to the thing described by the struct.
      struct gpio_chip stands out by confusingly using a struct device *dev
      to point to the parent device (such as a platform_device) that
      represents the hardware. As we want to give gpio_chip:s real devices,
      this is not working. We need to rename this member to parent.
      
      This was done by two coccinelle scripts, I guess it is possible to
      combine them into one, but I don't know such stuff. They look like
      this:
      
      @@
      struct gpio_chip *var;
      @@
      -var->dev
      +var->parent
      
      and:
      
      @@
      struct gpio_chip var;
      @@
      -var.dev
      +var.parent
      
      and:
      
      @@
      struct bgpio_chip *var;
      @@
      -var->gc.dev
      +var->gc.parent
      
      Plus a few instances of bgpio that I couldn't figure out how
      to teach Coccinelle to rewrite.
      
      This patch hits all over the place, but I *strongly* prefer this
      solution to any piecemal approaches that just exercise patch
      mechanics all over the place. It mainly hits drivers/gpio and
      drivers/pinctrl which is my own backyard anyway.
      
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Rafał Miłecki <zajec5@gmail.com>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
      Cc: Alek Du <alek.du@intel.com>
      Cc: Jaroslav Kysela <perex@perex.cz>
      Cc: Takashi Iwai <tiwai@suse.com>
      Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
      Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Acked-by: NLee Jones <lee.jones@linaro.org>
      Acked-by: NJiri Kosina <jkosina@suse.cz>
      Acked-by: NHans-Christian Egtvedt <egtvedt@samfundet.no>
      Acked-by: NJacek Anaszewski <j.anaszewski@samsung.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      58383c78
  13. 28 10月, 2015 1 次提交
  14. 28 7月, 2015 1 次提交
    • R
      gpio: kill off set_irq_flags usage · 23393d49
      Rob Herring 提交于
      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: NRob Herring <robh@kernel.org>
      Cc: Michael Hennerich <michael.hennerich@analog.com>
      Acked-by: NLinus 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: NLinus Walleij <linus.walleij@linaro.org>
      23393d49
  15. 08 4月, 2015 2 次提交
  16. 26 1月, 2015 1 次提交
  17. 12 12月, 2014 1 次提交
  18. 03 12月, 2014 1 次提交
  19. 27 11月, 2014 3 次提交
  20. 29 10月, 2014 1 次提交
  21. 05 9月, 2014 1 次提交
  22. 22 7月, 2014 1 次提交
  23. 05 7月, 2014 1 次提交
  24. 28 5月, 2014 1 次提交
    • L
      gpio: mcp23s08: switch chip count to int · 596a1c5f
      Linus Walleij 提交于
      Commit 3e3bed91
      "gpio: mcp23s08: fixed count variable for devicetree probing"
      introduced a loop check to see if the number of chips were
      unconsistent and going below zero counting downwards, but
      this requires the counting variable to be able to be
      negative, so switch the variable from unsigned to int.
      
      Cc: Michael Stickel <ms@mycable.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      596a1c5f
  25. 27 5月, 2014 1 次提交
    • M
      gpio: mcp23s08: fixed count variable for devicetree probing · 3e3bed91
      Michael Stickel 提交于
      Fixed missing increase of count variable for devicetree path in driver
      probing.
      
      The gpio-mcp23s08 driver has two paths for getting the platform
      registration information. One for the classic platform initialization
      and one for openfirmware devicetree based initialization. The devicetree
      based path is missing the increase of the count variable, which results
      in the count variable to become negative in the later use, where it is
      decreased. The count variable is used as an index into a vector. This
      results in accessing invalid memory space and can result in an exception.
      
      Tested this with an AM3352 SoC with two mcp23s17 on two chip selects as
      well as on a shared chip select.
      Signed-off-by: NMichael Stickel <ms@mycable.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      3e3bed91