1. 25 9月, 2015 1 次提交
  2. 28 7月, 2015 1 次提交
  3. 16 7月, 2015 2 次提交
  4. 19 5月, 2015 1 次提交
  5. 04 3月, 2015 1 次提交
    • B
      gpio: add GPIO hogging mechanism · f625d460
      Benoit Parrot 提交于
      Based on Boris Brezillion's work this is a reworked patch
      of his initial GPIO hogging mechanism.
      This patch provides a way to initially configure specific GPIO
      when the GPIO controller is probed.
      
      The actual DT scanning to collect the GPIO specific data is performed
      as part of gpiochip_add().
      
      The purpose of this is to allow specific GPIOs to be configured
      without any driver specific code.
      This is particularly useful because board design are getting
      increasingly complex and given SoC pins can now have more
      than 10 mux values, a lot of connections are now dependent on
      external IO muxes to switch various modes.
      
      Specific drivers should not necessarily need to be aware of
      what accounts to a specific board implementation. This board level
      "description" should be best kept as part of the dts file.
      Signed-off-by: NBenoit Parrot <bparrot@ti.com>
      Reviewed-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f625d460
  6. 23 2月, 2015 1 次提交
  7. 16 1月, 2015 2 次提交
  8. 17 8月, 2014 1 次提交
  9. 23 7月, 2014 2 次提交
  10. 09 7月, 2014 1 次提交
  11. 21 5月, 2014 1 次提交
    • A
      gpio: make of_get_named_gpiod_flags() private · f01d9075
      Alexandre Courbot 提交于
      of_get_named_gpiod_flags() is visible and directly usable by GPIO
      consumers, but it really should not as the gpiod interface relies
      on the simpler gpiod_get() to provide properly-configured GPIOs.
      
      of_get_named_gpiod_flags() is just used internally by gpiolib to
      implement gpiod_get(), and by the old of_get_named_gpio_flags()
      function, therefore it makes sense to make it gpiolib-private.
      
      As a side-effect, the unused (and unneeded) of_get_gpiod_flags()
      inline function is also removed, and of_get_named_gpio_flags() is moved
      from a static inline function to a regular one in gpiolib-of.c
      
      This results in all references to gpiod_* functions in of_gpio.h being
      gone, which is the way it should be since this file is part of the old
      integer GPIO interface.
      
      Changes since v1:
      - Fixed compilation error when CONFIG_OF_GPIO is not defined
      - Fixed warning due to of_gpio_flags enum not being declared
        in private gpiolib.h header
      Signed-off-by: NAlexandre Courbot <acourbot@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f01d9075
  12. 29 4月, 2014 1 次提交
  13. 06 2月, 2014 1 次提交
  14. 20 10月, 2013 1 次提交
  15. 16 10月, 2013 1 次提交
  16. 30 8月, 2013 1 次提交
  17. 16 8月, 2013 1 次提交
  18. 27 3月, 2013 1 次提交
  19. 07 3月, 2013 2 次提交
  20. 13 2月, 2013 1 次提交
  21. 21 1月, 2013 1 次提交
  22. 21 11月, 2012 1 次提交
  23. 12 11月, 2012 4 次提交
    • L
      gpiolib: separation of pin concerns · 1e63d7b9
      Linus Walleij 提交于
      The fact that of_gpiochip_add_pin_range() and
      gpiochip_add_pin_range() share too much code is fragile and
      will invariably mean that bugs need to be fixed in two places
      instead of one.
      
      So separate the concerns of gpiolib.c and gpiolib-of.c and
      have the latter call the former as back-end. This is necessary
      also when going forward with other device descriptions such
      as ACPI.
      
      This is done by:
      
      - Adding a return code to gpiochip_add_pin_range() so we can
        reliably check whether this succeeds.
      
      - Get rid of the custom of_pinctrl_add_gpio_range() from
        pinctrl. Instead create of_pinctrl_get() to just retrive the
        pin controller per se from an OF node. This composite
        function was just begging to be deleted, it was way to
        purpose-specific.
      
      - Use pinctrl_dev_get_name() to get the name of the retrieved
        pin controller and use that to call back into the generic
        gpiochip_add_pin_range().
      
      Now the pin range is only allocated and tied to a pin
      controller from the core implementation in gpiolib.c.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      1e63d7b9
    • L
      gpiolib: remove duplicate pin range code · e93fa3f2
      Linus Walleij 提交于
      Commit 69e1601bca88809dc118abd1becb02c15a02ec71
      "gpiolib: provide provision to register pin ranges"
      
      Introduced both of_gpiochip_remove_pin_range() and
      gpiochip_remove_pin_ranges(). But the contents are exactly
      the same so remove the OF one and rely on the range deletion
      in the core.
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      e93fa3f2
    • L
      gpiolib-of: staticize the pin range calls · 167c1af9
      Linus Walleij 提交于
      Commit 69e1601bca88809dc118abd1becb02c15a02ec71
      "gpiolib: provide provision to register pin ranges"
      
      Declared the of_gpiochip_[add|remove]_pin_range() global
      while they should be static as they are only ever used in
      this file. Let's convert them to static.
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      167c1af9
    • S
      gpiolib: provide provision to register pin ranges · f23f1516
      Shiraz Hashim 提交于
      pinctrl subsystem needs gpio chip base to prepare set of gpio
      pin ranges, which a given pinctrl driver can handle. This is
      important to handle pinctrl gpio request calls in order to
      program a given pin properly for gpio operation.
      
      As gpio base is allocated dynamically during gpiochip
      registration, presently there exists no clean way to pass this
      information to the pinctrl subsystem.
      
      After few discussions from [1], it was concluded that may be
      gpio controller reporting the pin range it supports, is a
      better way than pinctrl subsystem directly registering it.
      
      [1] http://comments.gmane.org/gmane.linux.ports.arm.kernel/184816
      
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NShiraz Hashim <shiraz.hashim@st.com>
      [Edited documentation a bit]
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f23f1516
  24. 17 8月, 2012 1 次提交
  25. 18 7月, 2012 2 次提交
  26. 26 5月, 2012 1 次提交
  27. 19 5月, 2012 1 次提交
  28. 08 4月, 2012 1 次提交
  29. 03 3月, 2012 1 次提交
  30. 06 2月, 2012 1 次提交
  31. 13 12月, 2011 2 次提交
    • G
      of: create of_phandle_args to simplify return of phandle parsing data · 15c9a0ac
      Grant Likely 提交于
      of_parse_phandle_with_args() needs to return quite a bit of data.  Rather
      than making each datum a separate **out_ argument, this patch creates
      struct of_phandle_args to contain all the returned data and reworks the
      user of the function.  This patch also enables of_parse_phandle_with_args()
      to return the device node pointer for the phandle node.
      
      This patch also ends up being fairly major surgery to
      of_parse_handle_with_args().  The existing structure didn't work well
      when extending to use of_phandle_args, and I discovered bugs during testing.
      I also took the opportunity to rename the function to be like the
      existing of_parse_phandle().
      
      v2: - moved declaration of of_phandle_args to fix compile on non-DT builds
          - fixed incorrect index in example usage
          - fixed incorrect return code handling for empty entries
      Reviewed-by: NShawn Guo <shawn.guo@freescale.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      15c9a0ac
    • G
      gpiolib: output basic details and consolidate gpio device drivers · 64842aad
      Grant Likely 提交于
      This patch adds a kernel message, containing GPIO range and device
      name on successful device registration, and removes duplicate messages from the following drivers:
      	* gpio-adp5588
      	* gpio-bt8xx
      	* gpio-cs5535
      	* gpio-janz-ttl
      	* gpio-nomadik
      	* gpio-pcf857x
      	* gpio-xilinx
      	* drivers/of/gpio.c
      Signed-off-by: NHartmut Knaack <knaack.h@gmx.de>
      [grant.likely@secretlab.ca: squashed 2 patches together]
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      64842aad