History

gpio: uapi: document uAPI v1 as deprecated

Update uAPI documentation to deprecate v1 structs and ioctls.

Kent Gibson committed 6 years ago

Commit b234d231 parent 65cff701 file · +26 −0Browse files

Unified · Split

include/uapi/linux/gpio.h+26−0
@@ -292,6 +292,9 @@ struct gpio_v2_line_event { · 291 unmodified lines
292 292
293/*293/*
294 * ABI v1294 * ABI v1
295 *
296 * This version of the ABI is deprecated.
297 * Use the latest version of the ABI, defined above, instead.
295 */298 */
296 299
297/* Informational flags */300/* Informational flags */
@@ -315,6 +318,9 @@ struct gpio_v2_line_event { · 17 unmodified lines
315 * @consumer: a functional name for the consumer of this GPIO line as set by318 * @consumer: a functional name for the consumer of this GPIO line as set by
316 * whatever is using it, will be empty if there is no current user but may319 * whatever is using it, will be empty if there is no current user but may
317 * also be empty if the consumer doesn't set this up320 * 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.
318 */324 */
319struct gpioline_info {325struct gpioline_info {
320 __u32 line_offset;326 __u32 line_offset;
@@ -346,6 +352,9 @@ enum { · 25 unmodified lines
346 * guarantee there are no implicit holes between it and subsequent members.352 * guarantee there are no implicit holes between it and subsequent members.
347 * The 20-byte padding at the end makes sure we don't add any implicit padding353 * The 20-byte padding at the end makes sure we don't add any implicit padding
348 * at the end of the structure on 64-bit architectures.354 * 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.
349 */358 */
350struct gpioline_info_changed {359struct gpioline_info_changed {
351 struct gpioline_info info;360 struct gpioline_info info;
@@ -385,6 +394,9 @@ struct gpioline_info_changed { · 33 unmodified lines
385 * @fd: if successful this field will contain a valid anonymous file handle394 * @fd: if successful this field will contain a valid anonymous file handle
386 * after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value395 * after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
387 * means error396 * means error
397 *
398 * This struct is part of ABI v1 and is deprecated.
399 * Use struct gpio_v2_line_request instead.
388 */400 */
389struct gpiohandle_request {401struct gpiohandle_request {
390 __u32 lineoffsets[GPIOHANDLES_MAX];402 __u32 lineoffsets[GPIOHANDLES_MAX];
@@ -404,6 +416,9 @@ struct gpiohandle_request { · 13 unmodified lines
404 * this specifies the default output value, should be 0 (low) or416 * this specifies the default output value, should be 0 (low) or
405 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)417 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
406 * @padding: reserved for future use and should be zero filled418 * @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.
407 */422 */
408struct gpiohandle_config {423struct gpiohandle_config {
409 __u32 flags;424 __u32 flags;
@@ -416,6 +431,9 @@ struct gpiohandle_config { · 6 unmodified lines
416 * @values: when getting the state of lines this contains the current431 * @values: when getting the state of lines this contains the current
417 * state of a line, when setting the state of lines these should contain432 * state of a line, when setting the state of lines these should contain
418 * the desired target state433 * the desired target state
434 *
435 * This struct is part of ABI v1 and is deprecated.
436 * Use struct gpio_v2_line_values instead.
419 */437 */
420struct gpiohandle_data {438struct gpiohandle_data {
421 __u8 values[GPIOHANDLES_MAX];439 __u8 values[GPIOHANDLES_MAX];
@@ -439,6 +457,9 @@ struct gpiohandle_data { · 17 unmodified lines
439 * @fd: if successful this field will contain a valid anonymous file handle457 * @fd: if successful this field will contain a valid anonymous file handle
440 * after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value458 * after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
441 * means error459 * means error
460 *
461 * This struct is part of ABI v1 and is deprecated.
462 * Use struct gpio_v2_line_request instead.
442 */463 */
443struct gpioevent_request {464struct gpioevent_request {
444 __u32 lineoffset;465 __u32 lineoffset;
@@ -458,6 +479,9 @@ struct gpioevent_request { · 13 unmodified lines
458 * struct gpioevent_data - The actual event being pushed to userspace479 * struct gpioevent_data - The actual event being pushed to userspace
459 * @timestamp: best estimate of time of event occurrence, in nanoseconds480 * @timestamp: best estimate of time of event occurrence, in nanoseconds
460 * @id: event identifier481 * @id: event identifier
482 *
483 * This struct is part of ABI v1 and is deprecated.
484 * Use struct gpio_v2_line_event instead.
461 */485 */
462struct gpioevent_data {486struct gpioevent_data {
463 __u64 timestamp;487 __u64 timestamp;
@@ -482,6 +506,8 @@ struct gpioevent_data { · 18 unmodified lines
482 506
483/*507/*
484 * v1 ioctl()s508 * v1 ioctl()s
509 *
510 * These ioctl()s are deprecated. Use the v2 equivalent instead.
485 */511 */
486#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)512#define GPIO_GET_LINEINFO_IOCTL _IOWR(0xB4, 0x02, struct gpioline_info)
487#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)513#define GPIO_GET_LINEHANDLE_IOCTL _IOWR(0xB4, 0x03, struct gpiohandle_request)