Skip to content

docs: added TIOCSERGSTRUCT ioctl docs#18521

Merged
linguini1 merged 1 commit intoapache:masterfrom
arjav1528:dev-issue-15778
Mar 11, 2026
Merged

docs: added TIOCSERGSTRUCT ioctl docs#18521
linguini1 merged 1 commit intoapache:masterfrom
arjav1528:dev-issue-15778

Conversation

@arjav1528
Copy link
Contributor

Fixes #15778

Summary

Add user-facing documentation for the TIOCSERGSTRUCT debug ioctl and its
CONFIG_SERIAL_TIOCSERGSTRUCT Kconfig option to the serial driver documentation.

Changes

Extends Documentation/components/drivers/character/serial.rst with a new
Serial Debug Structure (TIOCSERGSTRUCT) section covering:

  • Purpose and scope of the ioctl as a debug-only facility.
  • Prerequisites for enabling it: CONFIG_DEBUG_FEATURES, MCU_SERIAL or
    16550_UART, and driver-level support (63+ drivers across ARM, ARM64,
    RISC-V, Xtensa, and MIPS already implement it).
  • menuconfig navigation path.
  • Warnings that the structure layout is driver-specific, unstable, and must
    not be used in production code.

Testing

  • Sphinx HTML build succeeds with no warnings related to the new section.
  • Generated HTML output verified to contain the new section with correct
    headings, code blocks, notes, and warnings.

@github-actions github-actions bot added Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium labels Mar 10, 2026
Add a new section documenting the TIOCSERGSTRUCT debug ioctl and CONFIG_SERIAL_TIOCSERGSTRUCT Kconfig option. The section covers enabling the feature, how the ioctl copies driver-internal state to user space, example usage with the 16550 UART driver, and a warning about the non-stable nature of exposed structures.

Signed-off-by: Arjav Patel <arjav1528@gmail.com>
Copy link
Contributor

@hartmannathan hartmannathan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for helping to improve documentation!

@linguini1 linguini1 merged commit cc464ea into apache:master Mar 11, 2026
3 checks passed
@arjav1528 arjav1528 deleted the dev-issue-15778 branch March 11, 2026 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Documentation Improvements or additions to documentation Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Missing documentation to SERIAL_TIOCSERGSTRUCT

6 participants