1. 16 10月, 2013 1 次提交
  2. 04 9月, 2013 1 次提交
    • L
      gpio: return -ENOTSUPP if debounce cannot be set · 65d87656
      Linus Walleij 提交于
      It appears some drivers are using gpio_set_debounce()
      opportunistically, i.e. without knowing whether it works or
      not. (Example: input/keyboard/gpio_keys.c) to account for
      this use case, return -ENOTSUPP and do not print any
      warnings in this case.
      
      Took a round over the other gpio_set_debounce() consumers
      to make sure that none of them are relying on the returned
      error code to be something specific.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      65d87656
  3. 03 9月, 2013 1 次提交
  4. 21 7月, 2013 1 次提交
  5. 20 6月, 2013 1 次提交
  6. 02 3月, 2013 3 次提交
  7. 28 2月, 2013 1 次提交
  8. 12 2月, 2013 3 次提交
  9. 09 2月, 2013 5 次提交
  10. 07 2月, 2013 1 次提交
  11. 05 2月, 2013 2 次提交
  12. 21 11月, 2012 5 次提交
  13. 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: call pin removal in chip removal function · 9ef0d6f7
      Linus Walleij 提交于
      This makes us call gpiochio_remove_pin_ranges() in the
      gpiochip_remove() function, so we get rid of ranges when
      freeing the chip.
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Reviewed-by: NViresh Kumar <viresh.kumar@linaro.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      9ef0d6f7
    • L
      gpiolib: fix up function prototypes etc · 165adc9c
      Linus Walleij 提交于
      Commit 69e1601bca88809dc118abd1becb02c15a02ec71
      "gpiolib: provide provision to register pin ranges"
      
      Got most of it's function prototypes wrong, so fix this up by:
      
      - Moving the void declarations into static inlines in
        <linux/gpio.h> (previously the actual prototypes were declared
        here...)
      
      - Declare the gpiochip_add_pin_range() and
        gpiochip_remove_pin_ranges() functions in <asm-generic/gpio.h>
        together with the pin range struct declaration itself.
      
      - Actually only implement these very functions in gpiolib.c
        if CONFIG_PINCTRL is set.
      
      - Additionally export the symbols since modules will need to
        be able to do this.
      Reviewed-by: NStephen Warren <swarren@nvidia.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      165adc9c
    • 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
  14. 26 10月, 2012 3 次提交
  15. 23 10月, 2012 1 次提交
    • R
      gpiolib: Refactor gpio_export · fc4e2514
      Ryan Mallon 提交于
      The gpio_export function uses nested if statements and the status
      variable to handle the failure cases. This makes the function logic
      difficult to follow. Refactor the code to abort immediately on failure
      using goto. This makes the code slightly longer, but significantly
      reduces the nesting and number of split lines and makes the code easier
      to read.
      Signed-off-by: NRyan Mallon <rmallon@gmail.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      fc4e2514
  16. 17 8月, 2012 1 次提交
  17. 18 7月, 2012 1 次提交
  18. 19 5月, 2012 3 次提交
  19. 06 4月, 2012 1 次提交
  20. 05 3月, 2012 1 次提交