Serial Gadget (with CDC ACM and CDC OBEX support)

modulename: g_serial.ko

configname: CONFIG_USB_G_SERIAL

Linux Kernel Configuration
└─>Device Drivers
└─>USB support
└─>USB Gadget Support
└─>USB Gadget precomposed configurations
└─>Serial Gadget (with CDC ACM and CDC OBEX support)
In linux kernel since version 2.6.20 (release Date: 2007-02-04)  
The Serial Gadget talks to the Linux-USB generic serial driver.
This driver supports a CDC-ACM module option, which can be used
to interoperate with MS-Windows hosts or with the Linux-USB
"cdc-acm" driver.

This driver also supports a CDC-OBEX option. You will need a
user space OBEX server talking to /dev/ttyGS*, since the kernel
itself doesn't implement the OBEX protocol.

Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "g_serial".

For more information, see Documentation/usb/gadget_serial.rst
which includes instructions and a "driver info file" needed to
make MS-Windows work with CDC ACM.

source code: