1. 31 3月, 2016 1 次提交
  2. 30 3月, 2016 2 次提交
  3. 16 3月, 2016 1 次提交
  4. 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
  5. 16 2月, 2016 1 次提交
  6. 05 1月, 2016 1 次提交
  7. 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
  8. 28 10月, 2015 1 次提交
  9. 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
  10. 08 4月, 2015 2 次提交
  11. 26 1月, 2015 1 次提交
  12. 12 12月, 2014 1 次提交
  13. 03 12月, 2014 1 次提交
  14. 27 11月, 2014 3 次提交
  15. 29 10月, 2014 1 次提交
  16. 05 9月, 2014 1 次提交
  17. 22 7月, 2014 1 次提交
  18. 05 7月, 2014 1 次提交
  19. 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
  20. 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
  21. 09 5月, 2014 2 次提交
  22. 18 3月, 2014 1 次提交
    • L
      gpio: switch drivers to use new callback · 57ef0428
      Linus Walleij 提交于
      This switches all GPIO and pin control drivers with irqchips
      that were using .startup() and .shutdown() callbacks to lock
      GPIO lines for IRQ usage over to using the .request_resources()
      and .release_resources() callbacks just introduced into the
      irqchip vtable.
      
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      57ef0428
  23. 12 3月, 2014 1 次提交
  24. 20 1月, 2014 1 次提交
  25. 17 1月, 2014 1 次提交
    • L
      gpio: mcp23s08: Add irq functionality for i2c chips · 4e47f91b
      Lars Poeschel 提交于
      This adds interrupt functionality for i2c chips to the driver.
      They can act as a interrupt-controller and generate interrupts, if
      the inputs change.
      This is tested with a mcp23017 chip on an arm based platform.
      
      v3:
      - be a bit more clear that the irq functionality is also available
        on spi versions of the chips, but the linux driver does not support
        this yet
      
      v2:
      - some more word about irq-mirror property in binding doc
      - use of_read_bool instead of of_find_property for
        "interrupt-contrller" and "irq-mirror"
      - cache the "interrupt-controller" for remove function
      - do set the irq-mirror bit only if device is marked as
        interrupt-controller
      - do create the irq mapping and setup of irq_desc of all possible
        interrupts in probe path instead of in gpio_to_irq
      - mark gpios as in use as interrupts in irq in irq_startup and
        unlock it in irq_shutdown
      - rename virq to child_irq
      - remove dev argument from mcp23s08_irq_setup function
      - move gpiochip_add before mcp23s08_irq_setup in probe path
      Signed-off-by: NLars Poeschel <poeschel@lemonage.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      4e47f91b
  26. 04 12月, 2013 1 次提交
    • L
      gpio/pinctrl: make gpio_chip members typed boolean · 9fb1f39e
      Linus Walleij 提交于
      This switches the two members of struct gpio_chip that were
      defined as unsigned foo:1 to bool, because that is indeed what
      they are. Switch all users in the gpio and pinctrl subsystems
      to assign these values with true/false instead of 0/1. The
      users outside these subsystems will survive since true/false
      is 1/0, atleast we set some kind of more strict typing example.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9fb1f39e
  27. 30 8月, 2013 1 次提交
  28. 16 8月, 2013 2 次提交
  29. 11 4月, 2013 1 次提交
    • L
      gpio: mcp23s08: convert driver to DT · 97ddb1c8
      Lars Poeschel 提交于
      This converts the mcp23s08 driver to be able to be used with
      device tree.
      
      There is a "spi-present-mask" device tree property, that allows to
      use multiple of this spi chips on the same chipselect.
      
      v4:
      - removed the ability to specify the pullup from device tree
      - updated binding doc
      
      v3:
      - removed mcp,chips device tree property in favour of a
          mcp,spi-present-mask and a flag for the pullup of every gpio
      - seperated the match table. Now there is one for i2c and one for spi
      - do the of reading stuff on stack of the probe function - no devm
          any more
      
      v2:
      - squashed booth patches together
      - fixed build warning, when CONFIG_OF is not defined
      - use of_match_ptr macro for of_match_table
      Signed-off-by: NLars Poeschel <poeschel@lemonage.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      97ddb1c8
  30. 29 11月, 2012 3 次提交
  31. 18 11月, 2012 1 次提交
  32. 19 5月, 2012 1 次提交