From df4878e969ccc047da45d2cd3af5d08031da1593 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Fri, 12 Feb 2016 14:48:23 +0100 Subject: 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 --- tools/gpio/lsgpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/gpio/lsgpio.c') diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c index 4cfe29d..692233f 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; -- cgit v1.1