1. 26 Jan, 2017 1 commit
    • Mika Westerberg's avatar
      pinctrl / gpio: Introduce .set_config() callback for GPIO chips · 2956b5d9
      Mika Westerberg authored
      Currently we already have two pin configuration related callbacks
      available for GPIO chips .set_single_ended() and .set_debounce(). In
      future we expect to have even more, which does not scale well if we need
      to add yet another callback to the GPIO chip structure for each possible
      configuration parameter.
      Better solution is to reuse what we already have available in the
      generic pinconf.
      To support this, we introduce a new .set_config() callback for GPIO
      chips. The callback takes a single packed pin configuration value as
      parameter. This can then be extended easily beyond what is currently
      supported by just adding new types to the generic pinconf enum.
      If the GPIO driver is backed up by a pinctrl driver the GPIO driver can
      just assign gpiochip_generic_config() (introduced in this patch) to
      .set_config and that will take care configuration requests are directed
      to the pinctrl driver.
      We then convert the existing drivers over .set_config() and finally
      remove the .set_single_ended() and .set_debounce() callbacks.
      Suggested-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  2. 23 Feb, 2016 1 commit
  3. 05 Jan, 2016 1 commit
    • Linus Walleij's avatar
      gpio: generic: factor into gpio_chip struct · 0f4630f3
      Linus Walleij authored
      The separate struct bgpio_chip has been a pain to handle, both
      by being confusingly similar in name to struct gpio_chip and
      for being contained inside a struct so that struct gpio_chip
      is contained in a struct contained in a struct, making several
      steps of dereferencing necessary.
      Make things simpler: include the fields directly into
      <linux/gpio/driver.h>, #ifdef:ed for CONFIG_GENERIC_GPIO, and
      get rid of the <linux/basic_mmio_gpio.h> altogether. Prefix
      some of the member variables with bgpio_* and add proper
      kerneldoc while we're at it.
      Modify all users to handle the change and use a struct
      gpio_chip directly. And while we're at it: replace all
      container_of() dereferencing by gpiochip_get_data() and
      registering the gpio_chip with gpiochip_add_data().
      Cc: arm@kernel.org
      Cc: Alexander Shiyan <shc_work@mail.ru>
      Cc: Shawn Guo <shawnguo@kernel.org>
      Cc: Sascha Hauer <kernel@pengutronix.de>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Cc: Sudeep Holla <sudeep.holla@arm.com>
      Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Olof Johansson <olof@lixom.net>
      Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: linux-omap@vger.kernel.org
      Cc: linux-samsung-soc@vger.kernel.org
      Cc: bcm-kernel-feedback-list@broadcom.com
      Acked-by: default avatarGregory Fong <gregory.0xf0@gmail.com>
      Acked-by: default avatarLiviu Dudau <Liviu.Dudau@arm.com>
      Acked-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Acked-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: Lee Jones's avatarLee Jones <lee.jones@linaro.org>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  4. 16 Sep, 2015 1 commit
    • Thomas Gleixner's avatar
      genirq: Remove irq argument from irq flow handlers · bd0b9ac4
      Thomas Gleixner authored
      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: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Julia Lawall <Julia.Lawall@lip6.fr>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
  5. 28 Jul, 2015 1 commit
    • 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:
      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's 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>
  6. 14 Jul, 2015 2 commits
    • Thomas Gleixner's avatar
      gpio/ep93xx: Prepare ep93xx_gpio_f_irq_handler for irq argument removal · e43ea7a7
      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
    • Thomas Gleixner's avatar
      gpio/ep93xx: Use irq_set_handler_locked() · 72b2a9ef
      Thomas Gleixner authored
      Use irq_set_handler_locked() as it avoids a redundant lookup of the
      irq descriptor.
      Search and replacement was done with coccinelle:
      struct irq_data *d;
      expression E1;
      -__irq_set_handler_locked(d->irq, E1);
      +irq_set_handler_locked(d, E1);
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Alexandre Courbot <gnurou@gmail.com>
      Cc: linux-gpio@vger.kernel.org
  7. 20 Oct, 2014 1 commit
  8. 27 May, 2014 1 commit
  9. 16 May, 2014 1 commit
  10. 16 Oct, 2013 1 commit
    • Linus Walleij's avatar
      gpio: ep93xx: get rid of bogus __raw* accessors · d27e06ac
      Linus Walleij authored
      I have no idea why this driver is using __raw* accessors for
      reading and writing registers, I suspect it is just force of
      habit or copy/paste. Change all to readb()/writeb() except
      one chain where I used writeb_relaxed() up until the last
      Cc: Ryan Mallon <rmallon@gmail.com>
      Cc: H Hartley Sweeten <hartleys@visionengravers.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
  11. 28 Nov, 2012 1 commit
  12. 19 May, 2012 1 commit
    • Shawn Guo's avatar
      gpio/generic: initialize basic_mmio_gpio shadow variables properly · 3e11f7b8
      Shawn Guo authored
      It fixes the issue in gpio-generic that commit fb149218 (gpio/mxc: add
      missing initialization of basic_mmio_gpio shadow variables) manged to
      fix in gpio-mxc driver, so that other platform specific drivers do not
      suffer from the same problem over and over again.
      Changes since v1:
      * Turn the last parameter of bgpio_init() "bool big_endian" into
        "unsigned long flags" and give those really quirky hardwares a
        chance to tell that reg_set and reg_dir are unreadable.
      Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
      [grant.likely: Fix big-endian usage to explicitly set BBGPIOF_BIG_ENDIAN]
      Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
  13. 26 Mar, 2012 1 commit
  14. 14 Mar, 2012 1 commit
  15. 31 Oct, 2011 1 commit
  16. 01 Oct, 2011 1 commit
  17. 22 Aug, 2011 1 commit
  18. 09 Jun, 2011 1 commit
  19. 08 Jun, 2011 1 commit
  20. 07 Jun, 2011 1 commit
  21. 06 Jun, 2011 2 commits
  22. 11 May, 2011 1 commit
  23. 31 Mar, 2011 1 commit
  24. 29 Mar, 2011 3 commits
  25. 24 Mar, 2011 2 commits
  26. 27 Jan, 2011 1 commit
  27. 25 Jan, 2011 1 commit
    • Hartley Sweeten's avatar
      ARM: 6636/1: ep93xx: default multiplexed gpio ports to gpio mode · fd015480
      Hartley Sweeten authored
      The EP93xx C and D GPIO ports are multiplexed with the Keypad Interface
      peripheral.  At power-up they default into non-GPIO mode with the Key
      Matrix controller enabled so these ports are unusable for GPIO.  Note
      that the Keypad Interface peripheral is only available in the EP9307,
      EP9312, and EP9315 processor variants.
      The keypad support will clear the DeviceConfig bits appropriately to
      enable the Keypad Interface when the driver is loaded.  And, when the
      driver is unloaded it will set the bits to return the ports to GPIO mode.
      To make these ports available for GPIO after power-up on all EP93xx
      processor variants, set the KEYS and GONK bits in the DeviceConfig
      Similarly, the E, G, and H ports are multiplexed with the IDE Interface
      peripheral.  At power-up these also default into non-GPIO mode.  Note
      that the IDE peripheral is only available in the EP9312 and EP9315
      processor variants.
      Since an IDE driver is not even available in mainline, set the EONIDE,
      GONIDE, and HONIDE bits in the DeviceConfig register so that these
      ports will be available for GPIO use after power-up.
      Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
      Acked-by: default avatarRyan Mallon <ryan@bluewatersys.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
  28. 13 Jan, 2011 1 commit
  29. 07 Apr, 2010 1 commit
  30. 24 Feb, 2010 1 commit
  31. 17 Jul, 2009 1 commit
  32. 27 Jun, 2009 2 commits
  33. 07 Sep, 2008 1 commit
  34. 06 Sep, 2008 1 commit