Commit Graph

3 Commits

Author SHA1 Message Date
Uwe Kleine-König 38575edcab gpio-hammer: fix make consumer_label suitable to work on gpio-nails
There are no gpio-nalils, so fix label accordingly.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-01-26 16:29:09 +01:00
Bamvor Jian Zhang 74100bb967 tools/gpio: re-work gpio hammer with gpio operations
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-10-24 16:33:11 +02:00
Linus Walleij 2a144dd091 tools/gpio: add the gpio-hammer tool
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: Michael Welling <mwelling@ieee.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-06-15 09:29:04 +02:00