1. 02 10月, 2015 10 次提交
  2. 25 9月, 2015 6 次提交
    • L
      gpio: keep the GPIO line names internal · f881bab0
      Linus Walleij 提交于
      This refactors the changes to the GPIO line naming mechanism to
      not have so widespread effects, instead we conclude the patch series
      by having created a name attribute in the GPIO descriptor, that need
      not be globally unique, and it will be initialized from the old
      .names array in struct gpio_chip if it exists, then used in the legacy
      sysfs code like the array was used previously.
      
      The associated changes to name lines from the device tree are
      controversial and need to stand alone from this. Resulting changes:
      
      1. Remove the export and the header for the gpio_name_to_desc() as so
      far the only use is inside gpiolib.c. Staticize gpio_name_to_desc()
      and move it above the only function using it.
      
      2. Only print a warning if there are two GPIO lines with the same name.
      The reason is to preserve current behaviour: before the previous
      changes to the naming mechanism this would not reject probing the
      driver, instead the error would occur when trying to export the line
      in sysfs, so restore this behaviour, but print a friendly warning
      if names collide.
      
      Cc: Johan Hovold <johan@kernel.org>
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      f881bab0
    • M
      gpiolib: Add gpio name information to /sys/kernel/debug/gpio · ced433e2
      Markus Pargmann 提交于
      Add some information about gpio names to the debugfs gpio file. name and
      label of a GPIO are then displayed next to each other. This way it is
      easy to see what the real name of GPIO is and what the driver requested
      it for.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      [Dropped unsolicited sysfs ABI patch hunk]
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ced433e2
    • M
      gpio-sysfs: Use gpio descriptor name instead of gpiochip names array · ddd54040
      Markus Pargmann 提交于
      The name is now stored in the gpio descriptor as well, for example to
      allow to store names from DT. This patch changes the sysfs gpio files
      to use the gpio descriptor name.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      ddd54040
    • M
      gpiolib: Use GPIO name from names array for gpio descriptor · 5f3ca732
      Markus Pargmann 提交于
      This patch adds GPIO names to the GPIO descriptors when initializing the
      gpiochip. It also introduces a check whether any of the new names will
      conflict with an existing GPIO name.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      5f3ca732
    • M
      gpio: Introduce gpio descriptor 'name' · c0017ed7
      Markus Pargmann 提交于
      The latest gpio hogging mechanism assigns each gpio a 'line-name' in the
      devicetree. The 'name' field is different from the 'label' field.
      'label' is only used for requested GPIOs to describe its current use by
      driver or userspace.
      
      The 'name' field describes the GPIO itself, not the use. This is most
      likely identical to the label in the schematic on the GPIO line and
      should help to find this particular GPIO.
      
      This is equivalent to the gpiochip->names array. However names should be
      stored in the GPIO descriptor. We will use gpiochip->names in the future
      only as initializer for the GPIO descriptors for drivers that assign
      GPIO names hardcoded. All other GPIO names will be parsed from DT and
      directly assigned to the GPIO descriptor.
      
      This patch adds a helper function to find gpio descriptors by name
      instead of gpio number.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c0017ed7
    • M
      gpiolib-of: Rename gpio_hog functions to be generic · fd7337fd
      Markus Pargmann 提交于
      The gpio hogging functions are currently only used for gpio-hogging. But
      these functions are widely generic ones which parse gpio device nodes in
      the DT.
      Signed-off-by: NMarkus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      fd7337fd
  3. 18 9月, 2015 12 次提交
  4. 17 9月, 2015 12 次提交