History

gpio: uapi: kernel-doc formatting improvements

Add kernel-doc formatting to all references to structs, enums, fields and constants, and move deprecation warnings into the Note section of the deprecated struct. Replace 'OR:ed' with 'added', as the former looks odd.

Kent Gibson committed 6 years ago

Commit 2cc522d1 parent f2016021 file · +47 −46Browse files

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

Unified · Split

include/uapi/linux/gpio.h+47−46
@@ -110,17 +110,17 @@ enum gpio_v2_line_attr_id { · 109 unmodified lines
110 * struct gpio_v2_line_attribute - a configurable attribute of a line110 * struct gpio_v2_line_attribute - a configurable attribute of a line
111 * @id: attribute identifier with value from &enum gpio_v2_line_attr_id111 * @id: attribute identifier with value from &enum gpio_v2_line_attr_id
112 * @padding: reserved for future use and must be zero filled112 * @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 GPIO113 * @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 as114 * 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:ed115 * %GPIO_V2_LINE_FLAG_ACTIVE_LOW, %GPIO_V2_LINE_FLAG_OUTPUT etc, added
116 * together. This overrides the default flags contained in the &struct116 * together. This overrides the default flags contained in the &struct
117 * gpio_v2_line_config for the associated line.117 * gpio_v2_line_config for the associated line.
118 * @values: if id is GPIO_V2_LINE_ATTR_ID_OUTPUT_VALUES, a bitmap118 * @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 bit119 * containing the values to which the lines will be set, with each bit
120 * number corresponding to the index into &struct120 * number corresponding to the index into &struct
121 * gpio_v2_line_request.offsets.121 * gpio_v2_line_request.offsets.
122 * @debounce_period_us: if id is GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the desired122 * @debounce_period_us: if id is %GPIO_V2_LINE_ATTR_ID_DEBOUNCE, the
123 * debounce period, in microseconds123 * desired debounce period, in microseconds
124 */124 */
125struct gpio_v2_line_attribute {125struct gpio_v2_line_attribute {
126 __u32 id;126 __u32 id;
@@ -147,12 +147,12 @@ struct gpio_v2_line_config_attribute { · 20 unmodified lines
147 147
148/**148/**
149 * struct gpio_v2_line_config - Configuration for GPIO lines149 * struct gpio_v2_line_config - Configuration for GPIO lines
150 * @flags: flags for the GPIO lines, with values from enum150 * @flags: flags for the GPIO lines, with values from &enum
151 * gpio_v2_line_flag, such as GPIO_V2_LINE_FLAG_ACTIVE_LOW,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 for152 * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together. This is the default for
153 * all requested lines but may be overridden for particular lines using153 * all requested lines but may be overridden for particular lines using
154 * attrs.154 * @attrs.
155 * @num_attrs: the number of attributes in attrs155 * @num_attrs: the number of attributes in @attrs
156 * @padding: reserved for future use and must be zero filled156 * @padding: reserved for future use and must be zero filled
157 * @attrs: the configuration attributes associated with the requested157 * @attrs: the configuration attributes associated with the requested
158 * lines. Any attribute should only be associated with a particular line158 * lines. Any attribute should only be associated with a particular line
@@ -175,17 +175,17 @@ struct gpio_v2_line_config { · 16 unmodified lines
175 * "my-bitbanged-relay"175 * "my-bitbanged-relay"
176 * @config: requested configuration for the lines.176 * @config: requested configuration for the lines.
177 * @num_lines: number of lines requested in this request, i.e. the number177 * @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 to178 * of valid fields in the %GPIO_V2_LINES_MAX sized arrays, set to 1 to
179 * request a single line179 * request a single line
180 * @event_buffer_size: a suggested minimum number of line events that the180 * @event_buffer_size: a suggested minimum number of line events that the
181 * kernel should buffer. This is only relevant if edge detection is181 * kernel should buffer. This is only relevant if edge detection is
182 * enabled in the configuration. Note that this is only a suggested value182 * 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 the183 * 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 minimum184 * buffer. If this field is zero then the buffer size defaults to a minimum
185 * of num_lines*16.185 * of @num_lines * 16.
186 * @padding: reserved for future use and must be zero filled186 * @padding: reserved for future use and must be zero filled
187 * @fd: if successful this field will contain a valid anonymous file handle187 * @fd: if successful this field will contain a valid anonymous file handle
188 * after a GPIO_GET_LINE_IOCTL operation, zero or negative value means188 * after a %GPIO_GET_LINE_IOCTL operation, zero or negative value means
189 * error189 * error
190 */190 */
191struct gpio_v2_line_request {191struct gpio_v2_line_request {
@@ -207,11 +207,12 @@ struct gpio_v2_line_request { · 15 unmodified lines
207 * @consumer: a functional name for the consumer of this GPIO line as set207 * @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 but208 * 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 up209 * 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 when210 * @offset: the local offset on this GPIO chip, fill this in when
213 * requesting the line information from the kernel211 * requesting the line information from the kernel
214 * @num_attrs: the number of attributes in attrs212 * @num_attrs: the number of attributes in @attrs
213 * @flags: flags for the GPIO lines, with values from &enum
214 * gpio_v2_line_flag, such as %GPIO_V2_LINE_FLAG_ACTIVE_LOW,
215 * %GPIO_V2_LINE_FLAG_OUTPUT etc, added together.
215 * @attrs: the configuration attributes associated with the line216 * @attrs: the configuration attributes associated with the line
216 * @padding: reserved for future use217 * @padding: reserved for future use
217 */218 */
@@ -244,7 +245,7 @@ enum gpio_v2_line_changed_type { · 26 unmodified lines
244 * of a GPIO line245 * of a GPIO line
245 * @info: updated line information246 * @info: updated line information
246 * @timestamp_ns: estimate of time of status change occurrence, in nanoseconds247 * @timestamp_ns: estimate of time of status change occurrence, in nanoseconds
247 * @event_type: the type of change with a value from enum248 * @event_type: the type of change with a value from &enum
248 * gpio_v2_line_changed_type249 * gpio_v2_line_changed_type
249 * @padding: reserved for future use250 * @padding: reserved for future use
250 */251 */
@@ -269,10 +270,10 @@ enum gpio_v2_line_event_id { · 18 unmodified lines
269/**270/**
270 * struct gpio_v2_line_event - The actual event being pushed to userspace271 * 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 * @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 the273 * The @timestamp_ns is read from %CLOCK_MONOTONIC and is intended to allow
273 * accurate measurement of the time between events. It does not provide274 * the accurate measurement of the time between events. It does not provide
274 * the wall-clock time.275 * the wall-clock time.
275 * @id: event identifier with value from enum gpio_v2_line_event_id276 * @id: event identifier with value from &enum gpio_v2_line_event_id
276 * @offset: the offset of the line that triggered the event277 * @offset: the offset of the line that triggered the event
277 * @seqno: the sequence number for this event in the sequence of events for278 * @seqno: the sequence number for this event in the sequence of events for
278 * all the lines in this line request279 * all the lines in this line request
@@ -319,8 +320,8 @@ struct gpio_v2_line_event { · 40 unmodified lines
319 * whatever is using it, will be empty if there is no current user but may320 * whatever is using it, will be empty if there is no current user but may
320 * also be empty if the consumer doesn't set this up321 * also be empty if the consumer doesn't set this up
321 *322 *
322 * This struct is part of ABI v1 and is deprecated.323 * Note: This struct is part of ABI v1 and is deprecated.
323 * Use struct gpio_v2_line_info instead.324 * Use &struct gpio_v2_line_info instead.
324 */325 */
325struct gpioline_info {326struct gpioline_info {
326 __u32 line_offset;327 __u32 line_offset;
@@ -344,18 +345,18 @@ enum { · 17 unmodified lines
344 * of a GPIO line345 * of a GPIO line
345 * @info: updated line information346 * @info: updated line information
346 * @timestamp: estimate of time of status change occurrence, in nanoseconds347 * @timestamp: estimate of time of status change occurrence, in nanoseconds
347 * @event_type: one of GPIOLINE_CHANGED_REQUESTED, GPIOLINE_CHANGED_RELEASED348 * @event_type: one of %GPIOLINE_CHANGED_REQUESTED,
348 * and GPIOLINE_CHANGED_CONFIG349 * %GPIOLINE_CHANGED_RELEASED and %GPIOLINE_CHANGED_CONFIG
349 * @padding: reserved for future use350 * @padding: reserved for future use
350 *351 *
351 * Note: struct gpioline_info embedded here has 32-bit alignment on its own,352 * The &struct gpioline_info embedded here has 32-bit alignment on its own,
352 * but it works fine with 64-bit alignment too. With its 72 byte size, we can353 * but it works fine with 64-bit alignment too. With its 72 byte size, we can
353 * guarantee there are no implicit holes between it and subsequent members.354 * guarantee there are no implicit holes between it and subsequent members.
354 * The 20-byte padding at the end makes sure we don't add any implicit padding355 * The 20-byte padding at the end makes sure we don't add any implicit padding
355 * at the end of the structure on 64-bit architectures.356 * at the end of the structure on 64-bit architectures.
356 *357 *
357 * This struct is part of ABI v1 and is deprecated.358 * Note: This struct is part of ABI v1 and is deprecated.
358 * Use struct gpio_v2_line_info_changed instead.359 * Use &struct gpio_v2_line_info_changed instead.
359 */360 */
360struct gpioline_info_changed {361struct gpioline_info_changed {
361 struct gpioline_info info;362 struct gpioline_info info;
@@ -379,13 +380,13 @@ struct gpioline_info_changed { · 17 unmodified lines
379 * @lineoffsets: an array of desired lines, specified by offset index for the380 * @lineoffsets: an array of desired lines, specified by offset index for the
380 * associated GPIO device381 * associated GPIO device
381 * @flags: desired flags for the desired GPIO lines, such as382 * @flags: desired flags for the desired GPIO lines, such as
382 * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed383 * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
383 * together. Note that even if multiple lines are requested, the same flags384 * together. Note that even if multiple lines are requested, the same flags
384 * must be applicable to all of them, if you want lines with individual385 * must be applicable to all of them, if you want lines with individual
385 * flags set, request them one by one. It is possible to select386 * flags set, request them one by one. It is possible to select
386 * a batch of input or output lines, but they must all have the same387 * a batch of input or output lines, but they must all have the same
387 * characteristics, i.e. all inputs or all outputs, all active low etc388 * characteristics, i.e. all inputs or all outputs, all active low etc
388 * @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set for a requested389 * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set for a requested
389 * line, this specifies the default output value, should be 0 (low) or390 * line, this specifies the default output value, should be 0 (low) or
390 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)391 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
391 * @consumer_label: a desired consumer label for the selected GPIO line(s)392 * @consumer_label: a desired consumer label for the selected GPIO line(s)
@@ -393,11 +394,11 @@ struct gpioline_info_changed { · 1 unmodified line
393 * @lines: number of lines requested in this request, i.e. the number of394 * @lines: number of lines requested in this request, i.e. the number of
394 * valid fields in the above arrays, set to 1 to request a single line395 * valid fields in the above arrays, set to 1 to request a single line
395 * @fd: if successful this field will contain a valid anonymous file handle396 * @fd: if successful this field will contain a valid anonymous file handle
396 * after a GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value397 * after a %GPIO_GET_LINEHANDLE_IOCTL operation, zero or negative value
397 * means error398 * means error
398 *399 *
399 * This struct is part of ABI v1 and is deprecated.400 * Note: This struct is part of ABI v1 and is deprecated.
400 * Use struct gpio_v2_line_request instead.401 * Use &struct gpio_v2_line_request instead.
401 */402 */
402struct gpiohandle_request {403struct gpiohandle_request {
403 __u32 lineoffsets[GPIOHANDLES_MAX];404 __u32 lineoffsets[GPIOHANDLES_MAX];
@@ -411,15 +412,15 @@ struct gpiohandle_request { · 7 unmodified lines
411/**412/**
412 * struct gpiohandle_config - Configuration for a GPIO handle request413 * struct gpiohandle_config - Configuration for a GPIO handle request
413 * @flags: updated flags for the requested GPIO lines, such as414 * @flags: updated flags for the requested GPIO lines, such as
414 * GPIOHANDLE_REQUEST_OUTPUT, GPIOHANDLE_REQUEST_ACTIVE_LOW etc, OR:ed415 * %GPIOHANDLE_REQUEST_OUTPUT, %GPIOHANDLE_REQUEST_ACTIVE_LOW etc, added
415 * together416 * together
416 * @default_values: if the GPIOHANDLE_REQUEST_OUTPUT is set in flags,417 * @default_values: if the %GPIOHANDLE_REQUEST_OUTPUT is set in flags,
417 * this specifies the default output value, should be 0 (low) or418 * this specifies the default output value, should be 0 (low) or
418 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)419 * 1 (high), anything else than 0 or 1 will be interpreted as 1 (high)
419 * @padding: reserved for future use and should be zero filled420 * @padding: reserved for future use and should be zero filled
420 *421 *
421 * This struct is part of ABI v1 and is deprecated.422 * Note: This struct is part of ABI v1 and is deprecated.
422 * Use struct gpio_v2_line_config instead.423 * Use &struct gpio_v2_line_config instead.
423 */424 */
424struct gpiohandle_config {425struct gpiohandle_config {
425 __u32 flags;426 __u32 flags;
@@ -433,8 +434,8 @@ struct gpiohandle_config { · 7 unmodified lines
433 * state of a line, when setting the state of lines these should contain434 * state of a line, when setting the state of lines these should contain
434 * the desired target state435 * the desired target state
435 *436 *
436 * This struct is part of ABI v1 and is deprecated.437 * Note: This struct is part of ABI v1 and is deprecated.
437 * Use struct gpio_v2_line_values instead.438 * Use &struct gpio_v2_line_values instead.
438 */439 */
439struct gpiohandle_data {440struct gpiohandle_data {
440 __u8 values[GPIOHANDLES_MAX];441 __u8 values[GPIOHANDLES_MAX];
@@ -450,17 +451,17 @@ struct gpiohandle_data { · 9 unmodified lines
450 * @lineoffset: the desired line to subscribe to events from, specified by451 * @lineoffset: the desired line to subscribe to events from, specified by
451 * offset index for the associated GPIO device452 * offset index for the associated GPIO device
452 * @handleflags: desired handle flags for the desired GPIO line, such as453 * @handleflags: desired handle flags for the desired GPIO line, such as
453 * GPIOHANDLE_REQUEST_ACTIVE_LOW or GPIOHANDLE_REQUEST_OPEN_DRAIN454 * %GPIOHANDLE_REQUEST_ACTIVE_LOW or %GPIOHANDLE_REQUEST_OPEN_DRAIN
454 * @eventflags: desired flags for the desired GPIO event line, such as455 * @eventflags: desired flags for the desired GPIO event line, such as
455 * GPIOEVENT_REQUEST_RISING_EDGE or GPIOEVENT_REQUEST_FALLING_EDGE456 * %GPIOEVENT_REQUEST_RISING_EDGE or %GPIOEVENT_REQUEST_FALLING_EDGE
456 * @consumer_label: a desired consumer label for the selected GPIO line(s)457 * @consumer_label: a desired consumer label for the selected GPIO line(s)
457 * such as "my-listener"458 * such as "my-listener"
458 * @fd: if successful this field will contain a valid anonymous file handle459 * @fd: if successful this field will contain a valid anonymous file handle
459 * after a GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value460 * after a %GPIO_GET_LINEEVENT_IOCTL operation, zero or negative value
460 * means error461 * means error
461 *462 *
462 * This struct is part of ABI v1 and is deprecated.463 * Note: This struct is part of ABI v1 and is deprecated.
463 * Use struct gpio_v2_line_request instead.464 * Use &struct gpio_v2_line_request instead.
464 */465 */
465struct gpioevent_request {466struct gpioevent_request {
466 __u32 lineoffset;467 __u32 lineoffset;
@@ -481,8 +482,8 @@ struct gpioevent_request { · 14 unmodified lines
481 * @timestamp: best estimate of time of event occurrence, in nanoseconds482 * @timestamp: best estimate of time of event occurrence, in nanoseconds
482 * @id: event identifier483 * @id: event identifier
483 *484 *
484 * This struct is part of ABI v1 and is deprecated.485 * Note: This struct is part of ABI v1 and is deprecated.
485 * Use struct gpio_v2_line_event instead.486 * Use &struct gpio_v2_line_event instead.
486 */487 */
487struct gpioevent_data {488struct gpioevent_data {
488 __u64 timestamp;489 __u64 timestamp;