1. 23 6月, 2016 2 次提交
  2. 15 6月, 2016 2 次提交
    • L
      tools/gpio: add the gpio-event-mon tool · 97f69747
      Linus Walleij 提交于
      The gpio-event-mon is used from userspace as an example of how
      to monitor GPIO line events. It will latch on to a certain
      GPIO line on a certain gpiochip and print timestamped events
      as they arrive.
      
      Example output:
      $ gpio-event-mon -n gpiochip2 -o 0 -r -f
      Monitoring line 0 on gpiochip2
      Initial line value: 1
      GPIO EVENT 946685798487609863: falling edge
      GPIO EVENT 946685798732482910: rising edge
      GPIO EVENT 946685799115997314: falling edge
      GPIO EVENT 946685799381469726: rising edge
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      97f69747
    • L
      tools/gpio: add the gpio-hammer tool · 2a144dd0
      Linus Walleij 提交于
      The gpio-hammer is used from userspace as an example of how
      to retrieve a GPIO handle for one or several GPIO lines and
      hammer the outputs from low to high and back again. It will
      pulse the selected lines once per second for a specified
      number of times or indefinitely if no loop count is
      supplied.
      
      Example output:
      $ gpio-hammer -n gpiochip0 -o5 -o6 -o7
      Hammer lines [5, 6, 7] on gpiochip0, initial states: [1, 1, 1]
      [-] [5: 0, 6: 0, 7: 0]
      Tested-by: NMichael Welling <mwelling@ieee.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      2a144dd0
  3. 31 3月, 2016 2 次提交
  4. 26 2月, 2016 1 次提交
  5. 23 2月, 2016 1 次提交
  6. 19 2月, 2016 2 次提交
    • L
      gpio: add userspace ABI for GPIO line information · 521a2ad6
      Linus Walleij 提交于
      This adds a GPIO line ABI for getting name, label and a few select
      flags from the kernel.
      
      This hides the kernel internals and only tells userspace what it
      may need to know: the different in-kernel consumers are masked
      behind the flag "kernel" and that is all userspace needs to know.
      
      However electric characteristics like active low, open drain etc
      are reflected to userspace, as this is important information.
      
      We provide information on all lines on all chips, later on we will
      likely add a flag for the chardev consumer so we can filter and
      display only the lines userspace actually uses in e.g. lsgpio,
      but then we first need an ABI for userspace to grab and use
      (get/set/select direction) a GPIO line.
      
      Sample output from "lsgpio" on ux500:
      
      GPIO chip: gpiochip7, "8011e000.gpio", 32 GPIO lines
              line 0: unnamed unlabeled
              line 1: unnamed unlabeled
      (...)
              line 25: unnamed "SFH7741 Proximity Sensor" [kernel output open-drain]
              line 26: unnamed unlabeled
      (...)
      Tested-by: NMichael Welling <mwelling@ieee.org>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      521a2ad6
    • L
      gpio: store reflect the label to userspace · df4878e9
      Linus Walleij 提交于
      The gpio_chip label is useful for userspace to understand what
      kind of GPIO chip it is dealing with. Let's store a copy of this
      label in the gpio_device, add it to the struct passed to userspace
      for GPIO_GET_CHIPINFO_IOCTL and modify lsgpio to show it.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      df4878e9
  7. 09 2月, 2016 1 次提交
    • L
      tools/gpio: create GPIO tools · 6d591c46
      Linus Walleij 提交于
      This creates GPIO tools under tools/gpio/* and adds a single
      example program to list the GPIOs on a system. When proper
      devices are created it provides this minimal output:
      
      Cc: Johan Hovold <johan@kernel.org>
      Cc: Michael Welling <mwelling@ieee.org>
      Cc: Markus Pargmann <mpa@pengutronix.de>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      6d591c46