Commit Graph
6 Commits
Author SHA1 Message Date
Kent Gibson e890678f69 tools: gpio: fix spurious close warning in gpio-utils
Fix bogus close warning that occurs when opening the character device
fails.

Signed-off-by: Kent Gibson <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-07-12 10:22:01 +02:00
Mykyta Poturai 9755162502 tools: gpio: Fix typo in gpio-utils
Replace COMSUMER with proper CONSUMER

Signed-off-by: Mykyta Poturai <[email protected]>
Signed-off-by: Bartosz Golaszewski <[email protected]>
2020-03-25 09:50:46 +01:00
Thomas Gleixner d2912cb15b treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
Based on 2 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Enrico Weigelt <[email protected]>
Reviewed-by: Kate Stewart <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2019-06-19 17:09:55 +02:00
Jacopo Mondi d327a224ba tools: gpio: Print error string on IOCTL failures
Add to error messages the error description by concatenating
output of strerror() function to error messages print out by
gpio-utils.c on IOCTL failures.
Rationalize error messages, while at there, making all of them
look the same.

Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
2017-10-07 00:03:14 +02:00
Bamvor Jian Zhang e1acec0e75 tools/gpio: add gpio basic opereations
Add basic gpio operations. User could get/set gpio value for specific
line of gpiochip.

Reference "tools/gpio/gpio-hammer.c" or
"tools/testing/selftest/gpio/gpio-mockup-chardev.c" for how to use it.

Signed-off-by: Bamvor Jian Zhang <[email protected]>
Reviewed-by: Michael Welling <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
2016-10-24 16:33:11 +02:00
Linus Walleij 6d591c46bc tools/gpio: create GPIO tools
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 <[email protected]>
Cc: Michael Welling <[email protected]>
Cc: Markus Pargmann <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
2016-02-09 11:09:48 +01:00