Skip to content

Commit b234d23

Browse files
warthog618brgl
authored andcommittedSep 30, 2020
gpio: uapi: document uAPI v1 as deprecated
Update uAPI documentation to deprecate v1 structs and ioctls. Signed-off-by: Kent Gibson <warthog618@gmail.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
1 parent 65cff70 commit b234d23

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
 

‎include/uapi/linux/gpio.h

+26
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,9 @@ struct gpio_v2_line_event {
292292

293293
/*
294294
* ABI v1
295+
*
296+
* This version of the ABI is deprecated.
297+
* Use the latest version of the ABI, defined above, instead.
295298
*/
296299

297300
/* Informational flags */
@@ -315,6 +318,9 @@ struct gpio_v2_line_event {
315318
* @consumer: a functional name for the consumer of this GPIO line as set by
316319
* whatever is using it, will be empty if there is no current user but may
317320
* 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.
318324
*/
319325
struct gpioline_info {
320326
__u32 line_offset;
@@ -346,6 +352,9 @@ enum {
346352
* guarantee there are no implicit holes between it and subsequent members.
347353
* The 20-byte padding at the end makes sure we don't add any implicit padding
348354
* 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.
349358
*/
350359
struct gpioline_info_changed {
351360
struct gpioline_info info;
@@ -385,6 +394,9 @@ struct gpioline_info_changed {
385394
* @fd: if successful this field will contain a valid anonymous file handle
386395
* after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
387396
* means error
397+
*
398+
* This struct is part of ABI v1 and is deprecated.
399+
* Use struct gpio_v2_line_request instead.
388400
*/
389401
struct gpiohandle_request {
390402
__u32 lineoffsets[GPIOHANDLES_MAX];
@@ -404,6 +416,9 @@ struct gpiohandle_request {
404416
* this specifies the default output value, should be 0 (low) or
405417
* 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
406418
* @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.
407422
*/
408423
struct gpiohandle_config {
409424
__u32 flags;
@@ -416,6 +431,9 @@ struct gpiohandle_config {
416431
* @values: when getting the state of lines this contains the current
417432
* state of a line, when setting the state of lines these should contain
418433
* the desired target state
434+
*
435+
* This struct is part of ABI v1 and is deprecated.
436+
* Use struct gpio_v2_line_values instead.
419437
*/
420438
struct gpiohandle_data {
421439
__u8 values[GPIOHANDLES_MAX];
@@ -439,6 +457,9 @@ struct gpiohandle_data {
439457
* @fd: if successful this field will contain a valid anonymous file handle
440458
* after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
441459
* means error
460+
*
461+
* This struct is part of ABI v1 and is deprecated.
462+
* Use struct gpio_v2_line_request instead.
442463
*/
443464
struct gpioevent_request {
444465
__u32 lineoffset;
@@ -458,6 +479,9 @@ struct gpioevent_request {
458479
* struct gpioevent_data - The actual event being pushed to userspace
459480
* @timestamp: best estimate of time of event occurrence, in nanoseconds
460481
* @id: event identifier
482+
*
483+
* This struct is part of ABI v1 and is deprecated.
484+
* Use struct gpio_v2_line_event instead.
461485
*/
462486
struct gpioevent_data {
463487
__u64 timestamp;
@@ -482,6 +506,8 @@ struct gpioevent_data {
482506

483507
/*
484508
* v1 ioctl()s
509+
*
510+
* These ioctl()s are deprecated. Use the v2 equivalent instead.
485511
*/
486512
#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)
487513
#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)

0 commit comments

Comments
 (0)