History

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.

Linus Walleij committed 10 years ago

Commit df4878e1 parent 0a7439e5 files · +22 −3Browse files

Showing the changes to include/uapi/linux/gpio.h (1 of 5 files). Show all

Unified · Split

include/uapi/linux/gpio.h+2−0
@@ -16,10 +16,12 @@ · 15 unmodified lines
1616 /**
1717 * struct gpiochip_info - Information about a certain GPIO chip
1818 * @name: the name of this GPIO chip
19+ * @label: a functional name for this GPIO chip
1920 * @lines: number of GPIO lines on this chip
2021 */
2122 struct gpiochip_info {
2223 char name[32];
24+ char label[32];
2325 __u32 lines;
2426 };
2527

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t