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
15 15
16/**16/**
17 * struct gpiochip_info - Information about a certain GPIO chip17 * struct gpiochip_info - Information about a certain GPIO chip
18 * @name: the name of this GPIO chip18 * @name: the Linux kernel name of this GPIO chip
19 * @label: a functional name for this GPIO chip19 * @label: a functional name for this GPIO chip, such as a product
20 * number, may be NULL
20 * @lines: number of GPIO lines on this chip21 * @lines: number of GPIO lines on this chip
21 */22 */
22struct gpiochip_info {23struct gpiochip_info {
@@ -34,20 +35,21 @@ struct gpiochip_info { · 11 unmodified lines
34 35
35/**36/**
36 * struct gpioline_info - Information about a certain GPIO line37 * struct gpioline_info - Information about a certain GPIO line
37 * @line_offset: the local offset on this GPIO device, fill in when38 * @line_offset: the local offset on this GPIO device, fill this in when
38 * requesting information from the kernel39 * requesting the line information from the kernel
39 * @flags: various flags for this line40 * @flags: various flags for this line
40 * @name: the name of this GPIO line41 * @name: the name of this GPIO line, such as the output pin of the line on the
41 * @label: a functional name for this GPIO line42 * chip, a rail or a pin header name on a board, as specified by the gpio
42 * @kernel: this GPIO is in use by the kernel43 * chip, may be NULL
43 * @out: this GPIO is an output line (false means it is an input)44 * @consumer: a functional name for the consumer of this GPIO line as set by
44 * @active_low: this GPIO is active low45 * 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
45 */47 */
46struct gpioline_info {48struct gpioline_info {
47 __u32 line_offset;49 __u32 line_offset;
48 __u32 flags;50 __u32 flags;
49 char name[32];51 char name[32];
50 char label[32];52 char consumer[32];
51};53};
52 54
53#define GPIO_GET_CHIPINFO_IOCTL _IOR('o', 0x01, struct gpiochip_info)55#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