History

gpio: present the consumer of a line to userspace

I named the field representing the current user of GPIO line as "label" but this is too vague and ambiguous. Before anyone gets confused, rename it to "consumer" and indicate clearly in the documentation that this is a string set by the user of the line. Also clean up leftovers in the documentation.

Linus Walleij committed 10 years ago

Commit 214338e1 parent d27c1723 files · +19 −17Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/linux/gpio.h+12−10
@@ -15,8 +15,9 @@ · 14 unmodified lines
1515
1616 /**
1717 * struct gpiochip_info - Information about a certain GPIO chip
18− * @name: the name of this GPIO chip
19− * @label: a functional name for this GPIO chip
18+ * @name: the Linux kernel name of this GPIO chip
19+ * @label: a functional name for this GPIO chip, such as a product
20+ * number, may be NULL
2021 * @lines: number of GPIO lines on this chip
2122 */
2223 struct gpiochip_info {
@@ -34,20 +35,21 @@ struct gpiochip_info { · 11 unmodified lines
3435
3536 /**
3637 * struct gpioline_info - Information about a certain GPIO line
37− * @line_offset: the local offset on this GPIO device, fill in when
38− * requesting information from the kernel
38+ * @line_offset: the local offset on this GPIO device, fill this in when
39+ * requesting the line information from the kernel
3940 * @flags: various flags for this line
40− * @name: the name of this GPIO line
41− * @label: a functional name for this GPIO line
42− * @kernel: this GPIO is in use by the kernel
43− * @out: this GPIO is an output line (false means it is an input)
44− * @active_low: this GPIO is active low
41+ * @name: the name of this GPIO line, such as the output pin of the line on the
42+ * chip, a rail or a pin header name on a board, as specified by the gpio
43+ * chip, may be NULL
44+ * @consumer: a functional name for the consumer of this GPIO line as set by
45+ * whatever is using it, will be NULL if there is no current user but may
46+ * also be NULL if the consumer doesn't set this up
4547 */
4648 struct gpioline_info {
4749 __u32 line_offset;
4850 __u32 flags;
4951 char name[32];
50− char label[32];
52+ char consumer[32];
5153 };
5254
5355 #define GPIO_GET_CHIPINFO_IOCTL _IOR('o', 0x01, struct gpiochip_info)

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