Documentation/usb/gadget-testing.rst
Source file repositories/reference/linux-study-clean/Documentation/usb/gadget-testing.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/usb/gadget-testing.rst- Extension
.rst- Size
- 35656 bytes
- Lines
- 1155
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: documentation
- Status
- atlas-only
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
==============
Gadget Testing
==============
This file summarizes information on basic testing of USB functions
provided by gadgets.
.. contents
1. ACM function
2. ECM function
3. ECM subset function
4. EEM function
5. FFS function
6. HID function
7. LOOPBACK function
8. MASS STORAGE function
9. MIDI function
10. NCM function
11. OBEX function
12. PHONET function
13. RNDIS function
14. SERIAL function
15. SOURCESINK function
16. UAC1 function (legacy implementation)
17. UAC2 function
18. UVC function
19. PRINTER function
20. UAC1 function (new API)
21. MIDI2 function
1. ACM function
===============
The function is provided by usb_f_acm.ko module.
Function-specific configfs interface
------------------------------------
The function name to use when creating the function directory is "acm".
The ACM function provides just one attribute in its function directory:
port_num
The attribute is read-only.
There can be at most 4 ACM/generic serial/OBEX ports in the system.
Testing the ACM function
------------------------
On the host::
cat > /dev/ttyACM<X>
On the device::
cat /dev/ttyGS<Y>
then the other way round
On the device::
cat > /dev/ttyGS<Y>
On the host::
cat /dev/ttyACM<X>
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: atlas-only.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.