aboutsummaryrefslogtreecommitdiff
path: root/tools/gpio
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-02-12 14:48:23 +0100
committerLinus Walleij <linus.walleij@linaro.org>2016-02-19 09:48:41 +0100
commitdf4878e969ccc047da45d2cd3af5d08031da1593 (patch)
tree2677387492b60fd5c6a42a317bde0e7e965aa8fa /tools/gpio
parent0a7439ef755d46a2e61d460d7a440f7fa65d7182 (diff)
downloadlinux-linaro-stable-df4878e969ccc047da45d2cd3af5d08031da1593.tar.gz
gpio: store reflect the label to userspace
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: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/gpio')
-rw-r--r--tools/gpio/lsgpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c
index 4cfe29da279b..692233f561fb 100644
--- a/tools/gpio/lsgpio.c
+++ b/tools/gpio/lsgpio.c
@@ -54,8 +54,8 @@ int list_device(const char *device_name)
goto free_chrdev_name;
}
- fprintf(stdout, "GPIO chip: %s, %u GPIO lines\n",
- cinfo.name, cinfo.lines);
+ fprintf(stdout, "GPIO chip: %s, \"%s\", %u GPIO lines\n",
+ cinfo.name, cinfo.label, cinfo.lines);
if (close(fd) == -1) {
ret = -errno;