History

Merge tag 'gpio-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull GPIO updates from Linus Walleij: "This time very little driver changes but lots of core changes. We have some interesting cooperative work for ARM and Intel alike, making the GPIO subsystem more and more suitable for industrial systems and the like, in addition to the in-kernel users. We touch driver core (device properties) and lib/* by adding one simple string array free function, these are authored by Andy Shevchenko who is a well known and recognized core helpers maintainers so this should be fine. We also see some Android GKI-related modularization in the MXC drivers. Core changes: - The big core change is the updated (v2) userspace character device API. This corrects badly designed 64-bit alignment around the line events. We also add the debounce request feature. This echoes the often quotes passage from Frederick Brooks "The mythical man-month" to always throw one away, which we have seen before in things such as V4L2. So we put in a new one and deprecate and obsolete the old one. - All example tools in tools/gpio/* are migrated to the new API to set a good example. The libgpiod userspace library has been augmented to use this new API pretty much from day 1. - Some misc API hardening by using strn* function calls has been added as well. - Use the simpler IDA interface for GPIO chip instance enumeration. - Add device core function for counting string arrays in device properties. - Provide a generic library function kfree_strarray() that can be used throughout the kernel. Driver enhancements: - The DesignWare dwapb-gpio driver has been enhanced and now uses the IRQ handling in the gpiolib core. - The mockup and aggregator drivers have seen some substantial code clean-up and now use more of the core kernel inftrastructure. - Misc cleanups using dev_err_probe(). - The MXC drivers (Freescale/NXP) can now be built modularized, which makes modularized GKI Android kernels happy" * tag 'gpio-v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (73 commits) gpiolib: Update header block in gpiolib-cdev.h gpiolib: cdev: switch from kstrdup() to kstrndup() docs: gpio: add a new document to its index.rst gpio: pca953x: Add support for the NXP PCAL9554B/C tools: gpio: add debounce support to gpio-event-mon tools: gpio: add multi-line monitoring to gpio-event-mon tools: gpio: port gpio-event-mon to v2 uAPI tools: gpio: port gpio-hammer to v2 uAPI tools: gpio: rename nlines to num_lines tools: gpio: port gpio-watch to v2 uAPI tools: gpio: port lsgpio to v2 uAPI gpio: uapi: document uAPI v1 as deprecated gpiolib: cdev: support setting debounce gpiolib: cdev: support GPIO_V2_LINE_SET_VALUES_IOCTL gpiolib: cdev: support GPIO_V2_LINE_SET_CONFIG_IOCTL gpiolib: cdev: support edge detection for uAPI v2 gpiolib: cdev: support GPIO_V2_GET_LINEINFO_IOCTL and GPIO_V2_GET_LINEINFO_WATCH_IOCTL gpiolib: cdev: support GPIO_V2_GET_LINE_IOCTL and GPIO_V2_LINE_GET_VALUES_IOCTL gpiolib: add build option for CDEV v1 ABI gpiolib: make cdev a build option ...

Linus Torvalds committed 6 years ago

Commit 0486bea2 parents a996b9c fc709df46 files · +2962 −938Browse files

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

Unified · Split

include/uapi/linux/gpio.h+321−13
@@ -11,9 +11,17 @@ · 10 unmodified lines
1111 #ifndef _UAPI_GPIO_H_
1212 #define _UAPI_GPIO_H_
1313
14+#include <linux/const.h>
1415 #include <linux/ioctl.h>
1516 #include <linux/types.h>
1617
18+/*
19+ * The maximum size of name and label arrays.
20+ *
21+ * Must be a multiple of 8 to ensure 32/64-bit alignment of structs.
22+ */
23+#define GPIO_MAX_NAME_SIZE 32
24+
1725 /**
1826 * struct gpiochip_info - Information about a certain GPIO chip
1927 * @name: the Linux kernel name of this GPIO chip
@@ -22,11 +30,273 @@ · 2 unmodified lines
2230 * @lines: number of GPIO lines on this chip
2331 */
2432 struct gpiochip_info {
25− char name[32];
26− char label[32];
33+ char name[GPIO_MAX_NAME_SIZE];
34+ char label[GPIO_MAX_NAME_SIZE];
2735 __u32 lines;
2836 };
2937
38+/*
39+ * Maximum number of requested lines.
40+ *
41+ * Must be no greater than 64, as bitmaps are restricted here to 64-bits
42+ * for simplicity, and a multiple of 2 to ensure 32/64-bit alignment of
43+ * structs.
44+ */
45+#define GPIO_V2_LINES_MAX 64
46+
47+/*
48+ * The maximum number of configuration attributes associated with a line
49+ * request.
50+ */
51+#define GPIO_V2_LINE_NUM_ATTRS_MAX 10
52+
53+/**
54+ * enum gpio_v2_line_flag - &struct gpio_v2_line_attribute.flags values
55+ * @GPIO_V2_LINE_FLAG_USED: line is not available for request
56+ * @GPIO_V2_LINE_FLAG_ACTIVE_LOW: line active state is physical low
57+ * @GPIO_V2_LINE_FLAG_INPUT: line is an input
58+ * @GPIO_V2_LINE_FLAG_OUTPUT: line is an output
59+ * @GPIO_V2_LINE_FLAG_EDGE_RISING: line detects rising (inactive to active)
60+ * edges
61+ * @GPIO_V2_LINE_FLAG_EDGE_FALLING: line detects falling (active to
62+ * inactive) edges
63+ * @GPIO_V2_LINE_FLAG_OPEN_DRAIN: line is an open drain output
64+ * @GPIO_V2_LINE_FLAG_OPEN_SOURCE: line is an open source output
65+ * @GPIO_V2_LINE_FLAG_BIAS_PULL_UP: line has pull-up bias enabled
66+ * @GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN: line has pull-down bias enabled
67+ * @GPIO_V2_LINE_FLAG_BIAS_DISABLED: line has bias disabled
68+ */
69+enum gpio_v2_line_flag {
70+ GPIO_V2_LINE_FLAG_USED = _BITULL(0),
71+ GPIO_V2_LINE_FLAG_ACTIVE_LOW = _BITULL(1),
72+ GPIO_V2_LINE_FLAG_INPUT = _BITULL(2),
73+ GPIO_V2_LINE_FLAG_OUTPUT = _BITULL(3),
74+ GPIO_V2_LINE_FLAG_EDGE_RISING = _BITULL(4),
75+ GPIO_V2_LINE_FLAG_EDGE_FALLING = _BITULL(5),
76+ GPIO_V2_LINE_FLAG_OPEN_DRAIN = _BITULL(6),
77+ GPIO_V2_LINE_FLAG_OPEN_SOURCE = _BITULL(7),
78+ GPIO_V2_LINE_FLAG_BIAS_PULL_UP = _BITULL(8),
79+ GPIO_V2_LINE_FLAG_BIAS_PULL_DOWN = _BITULL(9),
80+ GPIO_V2_LINE_FLAG_BIAS_DISABLED = _BITULL(10),
81+};
82+
83+/**
84+ * struct gpio_v2_line_values - Values of GPIO lines
85+ * @bits: a bitmap containing the value of the lines, set to 1 for active
86+ * and 0 for inactive.
87+ * @mask: a bitmap identifying the lines to get or set, with each bit
88+ * number corresponding to the index into &struct
89+ * gpio_v2_line_request.offsets.
90+ */
91+struct gpio_v2_line_values {
92+ __aligned_u64 bits;
93+ __aligned_u64 mask;
94+};
95+
96+/**
97+ * enum gpio_v2_line_attr_id - &struct gpio_v2_line_attribute.id values
98+ * identifying which field of the attribute union is in use.
99+ * @GPIO_V2_LINE_ATTR_ID_FLAGS: flags field is in use
100+ * @GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES: values field is in use
101+ * @GPIO_V2_LINE_ATTR_ID_DEBOUNCE: debounce_period_us is in use
102+ */
103+enum gpio_v2_line_attr_id {
104+ GPIO_V2_LINE_ATTR_ID_FLAGS = 1,
105+ GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES = 2,
106+ GPIO_V2_LINE_ATTR_ID_DEBOUNCE = 3,
107+};
108+
109+/**
110+ * struct gpio_v2_line_attribute - a configurable attribute of a line
111+ * @id: attribute identifier with value from &enum gpio_v2_line_attr_id
112+ * @padding: reserved for future use and must be zero filled
113+ * @flags: if id is GPIO_V2_LINE_ATTR_ID_FLAGS, the flags for the GPIO
114+ * line, with values from enum gpio_v2_line_flag, such as
115+ * GPIO_V2_LINE_FLAG_ACTIVE_LOW, GPIO_V2_LINE_FLAG_OUTPUT etc, OR:ed
116+ * together. This overrides the default flags contained in the &struct
117+ * gpio_v2_line_config for the associated line.
118+ * @values: if id is GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap
119+ * containing the values to which the lines will be set, with each bit
120+ * number corresponding to the index into &struct
121+ * gpio_v2_line_request.offsets.
122+ * @debounce_period_us: if id is GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the desired
123+ * debounce period, in microseconds
124+ */
125+struct gpio_v2_line_attribute {
126+ __u32 id;
127+ __u32 padding;
128+ union {
129+ __aligned_u64 flags;
130+ __aligned_u64 values;
131+ __u32 debounce_period_us;
132+ };
133+};
134+
135+/**
136+ * struct gpio_v2_line_config_attribute - a configuration attribute
137+ * associated with one or more of the requested lines.
138+ * @attr: the configurable attribute
139+ * @mask: a bitmap identifying the lines to which the attribute applies,
140+ * with each bit number corresponding to the index into &struct
141+ * gpio_v2_line_request.offsets.
142+ */
143+struct gpio_v2_line_config_attribute {
144+ struct gpio_v2_line_attribute attr;
145+ __aligned_u64 mask;
146+};
147+
148+/**
149+ * struct gpio_v2_line_config - Configuration for GPIO lines
150+ * @flags: flags for the GPIO lines, with values from enum
151+ * gpio_v2_line_flag, such as GPIO_V2_LINE_FLAG_ACTIVE_LOW,
152+ * GPIO_V2_LINE_FLAG_OUTPUT etc, OR:ed together. This is the default for
153+ * all requested lines but may be overridden for particular lines using
154+ * attrs.
155+ * @num_attrs: the number of attributes in attrs
156+ * @padding: reserved for future use and must be zero filled
157+ * @attrs: the configuration attributes associated with the requested
158+ * lines. Any attribute should only be associated with a particular line
159+ * once. If an attribute is associated with a line multiple times then the
160+ * first occurrence (i.e. lowest index) has precedence.
161+ */
162+struct gpio_v2_line_config {
163+ __aligned_u64 flags;
164+ __u32 num_attrs;
165+ /* Pad to fill implicit padding and reserve space for future use. */
166+ __u32 padding[5];
167+ struct gpio_v2_line_config_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
168+};
169+
170+/**
171+ * struct gpio_v2_line_request - Information about a request for GPIO lines
172+ * @offsets: an array of desired lines, specified by offset index for the
173+ * associated GPIO chip
174+ * @consumer: a desired consumer label for the selected GPIO lines such as
175+ * "my-bitbanged-relay"
176+ * @config: requested configuration for the lines.
177+ * @num_lines: number of lines requested in this request, i.e. the number
178+ * of valid fields in the GPIO_V2_LINES_MAX sized arrays, set to 1 to
179+ * request a single line
180+ * @event_buffer_size: a suggested minimum number of line events that the
181+ * kernel should buffer. This is only relevant if edge detection is
182+ * enabled in the configuration. Note that this is only a suggested value
183+ * and the kernel may allocate a larger buffer or cap the size of the
184+ * buffer. If this field is zero then the buffer size defaults to a minimum
185+ * of num_lines*16.
186+ * @padding: reserved for future use and must be zero filled
187+ * @fd: if successful this field will contain a valid anonymous file handle
188+ * after a GPIO_GET_LINE_IOCTL operation, zero or negative value means
189+ * error
190+ */
191+struct gpio_v2_line_request {
192+ __u32 offsets[GPIO_V2_LINES_MAX];
193+ char consumer[GPIO_MAX_NAME_SIZE];
194+ struct gpio_v2_line_config config;
195+ __u32 num_lines;
196+ __u32 event_buffer_size;
197+ /* Pad to fill implicit padding and reserve space for future use. */
198+ __u32 padding[5];
199+ __s32 fd;
200+};
201+
202+/**
203+ * struct gpio_v2_line_info - Information about a certain GPIO line
204+ * @name: the name of this GPIO line, such as the output pin of the line on
205+ * the chip, a rail or a pin header name on a board, as specified by the
206+ * GPIO chip, may be empty
207+ * @consumer: a functional name for the consumer of this GPIO line as set
208+ * by whatever is using it, will be empty if there is no current user but
209+ * may also be empty if the consumer doesn't set this up
210+ * @flags: flags for the GPIO line, such as GPIO_V2_LINE_FLAG_ACTIVE_LOW,
211+ * GPIO_V2_LINE_FLAG_OUTPUT etc, OR:ed together
212+ * @offset: the local offset on this GPIO chip, fill this in when
213+ * requesting the line information from the kernel
214+ * @num_attrs: the number of attributes in attrs
215+ * @attrs: the configuration attributes associated with the line
216+ * @padding: reserved for future use
217+ */
218+struct gpio_v2_line_info {
219+ char name[GPIO_MAX_NAME_SIZE];
220+ char consumer[GPIO_MAX_NAME_SIZE];
221+ __u32 offset;
222+ __u32 num_attrs;
223+ __aligned_u64 flags;
224+ struct gpio_v2_line_attribute attrs[GPIO_V2_LINE_NUM_ATTRS_MAX];
225+ /* Space reserved for future use. */
226+ __u32 padding[4];
227+};
228+
229+/**
230+ * enum gpio_v2_line_changed_type - &struct gpio_v2_line_changed.event_type
231+ * values
232+ * @GPIO_V2_LINE_CHANGED_REQUESTED: line has been requested
233+ * @GPIO_V2_LINE_CHANGED_RELEASED: line has been released
234+ * @GPIO_V2_LINE_CHANGED_CONFIG: line has been reconfigured
235+ */
236+enum gpio_v2_line_changed_type {
237+ GPIO_V2_LINE_CHANGED_REQUESTED = 1,
238+ GPIO_V2_LINE_CHANGED_RELEASED = 2,
239+ GPIO_V2_LINE_CHANGED_CONFIG = 3,
240+};
241+
242+/**
243+ * struct gpio_v2_line_info_changed - Information about a change in status
244+ * of a GPIO line
245+ * @info: updated line information
246+ * @timestamp_ns: estimate of time of status change occurrence, in nanoseconds
247+ * @event_type: the type of change with a value from enum
248+ * gpio_v2_line_changed_type
249+ * @padding: reserved for future use
250+ */
251+struct gpio_v2_line_info_changed {
252+ struct gpio_v2_line_info info;
253+ __aligned_u64 timestamp_ns;
254+ __u32 event_type;
255+ /* Pad struct to 64-bit boundary and reserve space for future use. */
256+ __u32 padding[5];
257+};
258+
259+/**
260+ * enum gpio_v2_line_event_id - &struct gpio_v2_line_event.id values
261+ * @GPIO_V2_LINE_EVENT_RISING_EDGE: event triggered by a rising edge
262+ * @GPIO_V2_LINE_EVENT_FALLING_EDGE: event triggered by a falling edge
263+ */
264+enum gpio_v2_line_event_id {
265+ GPIO_V2_LINE_EVENT_RISING_EDGE = 1,
266+ GPIO_V2_LINE_EVENT_FALLING_EDGE = 2,
267+};
268+
269+/**
270+ * struct gpio_v2_line_event - The actual event being pushed to userspace
271+ * @timestamp_ns: best estimate of time of event occurrence, in nanoseconds.
272+ * The timestamp_ns is read from CLOCK_MONOTONIC and is intended to allow the
273+ * accurate measurement of the time between events. It does not provide
274+ * the wall-clock time.
275+ * @id: event identifier with value from enum gpio_v2_line_event_id
276+ * @offset: the offset of the line that triggered the event
277+ * @seqno: the sequence number for this event in the sequence of events for
278+ * all the lines in this line request
279+ * @line_seqno: the sequence number for this event in the sequence of
280+ * events on this particular line
281+ * @padding: reserved for future use
282+ */
283+struct gpio_v2_line_event {
284+ __aligned_u64 timestamp_ns;
285+ __u32 id;
286+ __u32 offset;
287+ __u32 seqno;
288+ __u32 line_seqno;
289+ /* Space reserved for future use. */
290+ __u32 padding[6];
291+};
292+
293+/*
294+ * ABI v1
295+ *
296+ * This version of the ABI is deprecated.
297+ * Use the latest version of the ABI, defined above, instead.
298+ */
299+
30300 /* Informational flags */
31301 #define GPIOLINE_FLAG_KERNEL (1UL << 0) /* Line used by the kernel */
32302 #define GPIOLINE_FLAG_IS_OUT (1UL << 1)
@@ -48,12 +318,15 @@ struct gpiochip_info { · 15 unmodified lines
48318 * @consumer: a functional name for the consumer of this GPIO line as set by
49319 * whatever is using it, will be empty if there is no current user but may
50320 * also be empty if the consumer doesn't set this up
321+ *
322+ * This struct is part of ABI v1 and is deprecated.
323+ * Use struct gpio_v2_line_info instead.
51324 */
52325 struct gpioline_info {
53326 __u32 line_offset;
54327 __u32 flags;
55− char name[32];
56− char consumer[32];
328+ char name[GPIO_MAX_NAME_SIZE];
329+ char consumer[GPIO_MAX_NAME_SIZE];
57330 };
58331
59332 /* Maximum number of requested handles */
@@ -79,6 +352,9 @@ enum { · 19 unmodified lines
79352 * guarantee there are no implicit holes between it and subsequent members.
80353 * The 20-byte padding at the end makes sure we don't add any implicit padding
81354 * at the end of the structure on 64-bit architectures.
355+ *
356+ * This struct is part of ABI v1 and is deprecated.
357+ * Use struct gpio_v2_line_info_changed instead.
82358 */
83359 struct gpioline_info_changed {
84360 struct gpioline_info info;
@@ -118,12 +394,15 @@ struct gpioline_info_changed { · 33 unmodified lines
118394 * @fd: if successful this field will contain a valid anonymous file handle
119395 * after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
120396 * means error
397+ *
398+ * This struct is part of ABI v1 and is deprecated.
399+ * Use struct gpio_v2_line_request instead.
121400 */
122401 struct gpiohandle_request {
123402 __u32 lineoffsets[GPIOHANDLES_MAX];
124403 __u32 flags;
125404 __u8 default_values[GPIOHANDLES_MAX];
126− char consumer_label[32];
405+ char consumer_label[GPIO_MAX_NAME_SIZE];
127406 __u32 lines;
128407 int fd;
129408 };
@@ -137,6 +416,9 @@ struct gpiohandle_request { · 7 unmodified lines
137416 * this specifies the default output value, should be 0 (low) or
138417 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
139418 * @padding: reserved for future use and should be zero filled
419+ *
420+ * This struct is part of ABI v1 and is deprecated.
421+ * Use struct gpio_v2_line_config instead.
140422 */
141423 struct gpiohandle_config {
142424 __u32 flags;
@@ -144,21 +426,19 @@ struct gpiohandle_config { · 1 unmodified line
144426 __u32 padding[4]; /* padding for future use */
145427 };
146428
147−#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0a, struct gpiohandle_config)
148−
149429 /**
150430 * struct gpiohandle_data - Information of values on a GPIO handle
151431 * @values: when getting the state of lines this contains the current
152432 * state of a line, when setting the state of lines these should contain
153433 * the desired target state
434+ *
435+ * This struct is part of ABI v1 and is deprecated.
436+ * Use struct gpio_v2_line_values instead.
154437 */
155438 struct gpiohandle_data {
156439 __u8 values[GPIOHANDLES_MAX];
157440 };
158441
159−#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)
160−#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)
161−
162442 /* Eventrequest flags */
163443 #define GPIOEVENT_REQUEST_RISING_EDGE (1UL << 0)
164444 #define GPIOEVENT_REQUEST_FALLING_EDGE (1UL << 1)
@@ -177,12 +457,15 @@ struct gpiohandle_data { · 12 unmodified lines
177457 * @fd: if successful this field will contain a valid anonymous file handle
178458 * after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
179459 * means error
460+ *
461+ * This struct is part of ABI v1 and is deprecated.
462+ * Use struct gpio_v2_line_request instead.
180463 */
181464 struct gpioevent_request {
182465 __u32 lineoffset;
183466 __u32 handleflags;
184467 __u32 eventflags;
185− char consumer_label[32];
468+ char consumer_label[GPIO_MAX_NAME_SIZE];
186469 int fd;
187470 };
188471
@@ -196,17 +479,42 @@ struct gpioevent_request { · 7 unmodified lines
196479 * struct gpioevent_data - The actual event being pushed to userspace
197480 * @timestamp: best estimate of time of event occurrence, in nanoseconds
198481 * @id: event identifier
482+ *
483+ * This struct is part of ABI v1 and is deprecated.
484+ * Use struct gpio_v2_line_event instead.
199485 */
200486 struct gpioevent_data {
201487 __u64 timestamp;
202488 __u32 id;
203489 };
204490
491+/*
492+ * v1 and v2 ioctl()s
493+ */
205494 #define GPIO_GET_CHIPINFO_IOCTL _IOR(0xB4, 0x01, struct gpiochip_info)
495+#define GPIO_GET_LINEINFO_UNWATCH_IOCTL _IOWR(0xB4, 0x0C, __u32)
496+
497+/*
498+ * v2 ioctl()s
499+ */
500+#define GPIO_V2_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x05, struct gpio_v2_line_info)
501+#define GPIO_V2_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x06, struct gpio_v2_line_info)
502+#define GPIO_V2_GET_LINE_IOCTL _IOWR(0xB4, 0x07, struct gpio_v2_line_request)
503+#define GPIO_V2_LINE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0D, struct gpio_v2_line_config)
504+#define GPIO_V2_LINE_GET_VALUES_IOCTL _IOWR(0xB4, 0x0E, struct gpio_v2_line_values)
505+#define GPIO_V2_LINE_SET_VALUES_IOCTL _IOWR(0xB4, 0x0F, struct gpio_v2_line_values)
506+
507+/*
508+ * v1 ioctl()s
509+ *
510+ * These ioctl()s are deprecated. Use the v2 equivalent instead.
511+ */
206512 #define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)
207−#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0b, struct gpioline_info)
208−#define GPIO_GET_LINEINFO_UNWATCH_IOCTL _IOWR(0xB4, 0x0c, __u32)
209513 #define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)
210514 #define GPIO_GET_LINEEVENT_IOCTL _IOWR(0xB4, 0x04, struct gpioevent_request)
515+#define GPIOHANDLE_GET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x08, struct gpiohandle_data)
516+#define GPIOHANDLE_SET_LINE_VALUES_IOCTL _IOWR(0xB4, 0x09, struct gpiohandle_data)
517+#define GPIOHANDLE_SET_CONFIG_IOCTL _IOWR(0xB4, 0x0A, struct gpiohandle_config)
518+#define GPIO_GET_LINEINFO_WATCH_IOCTL _IOWR(0xB4, 0x0B, struct gpioline_info)
211519
212520 #endif /* _UAPI_GPIO_H_ */