1. 30 Mar, 2016 30 commits
  2. 29 Mar, 2016 8 commits
  3. 28 Mar, 2016 2 commits
    • Geert Uytterhoeven's avatar
      gpio: rcar: Add Runtime PM handling for interrupts · 93267aeb
      Geert Uytterhoeven authored
      commit b26a719b upstream.
      
      The R-Car GPIO driver handles Runtime PM for requested GPIOs only.
      
      When using a GPIO purely as an interrupt source, no Runtime PM handling
      is done, and the GPIO module's clock may not be enabled.
      
      To fix this:
        - Add .irq_request_resources() and .irq_release_resources() callbacks
          to handle Runtime PM when an interrupt is requested,
        - Add irq_bus_lock() and sync_unlock() callbacks to handle Runtime PM
          when e.g. disabling/enabling an interrupt, or configuring the
          interrupt type.
      
      Fixes: d5c3d846 "net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS"
      Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      93267aeb
    • Linus Walleij's avatar
      gpio: add a data pointer to gpio_chip · 70ee401b
      Linus Walleij authored
      commit b08ea35a upstream.
      
      This adds a void * pointer to gpio_chip so that driver can
      assign and retrieve some states. This is done to get rid of
      container_of() calls for gpio_chips embedded inside state
      containers, so we can remove the need to have the gpio_chip
      or later (planned) struct gpio_device be dynamically allocated
      at registration time, so that its struct device can be properly
      reference counted and not bound to its parent device (e.g.
      a platform_device) but instead live on after unregistration
      if it is opened by e.g. a char device or sysfs.
      
      The data is added with the new function gpiochip_add_data()
      and for compatibility we add static inline wrapper function
      gpiochip_add() that will call gpiochip_add_data() with
      NULL as argument. The latter will be removed once we have
      exorcised gpiochip_add() from the kernel.
      
      gpiochip_get_data() is added as a static inline accessor
      for drivers to quickly get their data out.
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      [ kamal: 4.2-stable prereq ]
      Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
      70ee401b