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>
This commit is contained in:
Linus Walleij
2016-02-12 14:48:23 +01:00
parent 0a7439ef75
commit df4878e969
5 changed files with 22 additions and 3 deletions

View File

@@ -16,10 +16,12 @@
/**
* struct gpiochip_info - Information about a certain GPIO chip
* @name: the name of this GPIO chip
* @label: a functional name for this GPIO chip
* @lines: number of GPIO lines on this chip
*/
struct gpiochip_info {
char name[32];
char label[32];
__u32 lines;
};