aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2008-06-19 20:52:07 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 18:15:59 -0400
commita7707adf9ee8de3c5b67e3793b98888f551ad00d (patch)
tree431137e4c39202f6395f64893966e3bdfa1349d2 /Documentation
parentc1dca562be8ada614ef193aa246c6f8705bcd6b9 (diff)
usb gadget: use new serial core
Teach "gadget serial" to use the new abstracted (and bugfixed) TTY glue, and remove all the orignal tangled-up code. Update the documentation accordingly. This is a net object code shrink and cleanup; it should make it a lot easier to see how the TTY glue should accomodate updates to the TTY layer, be bugfixed, etc. Notable behavior changes include: it can now support getty even when there's no USB connection; it fits properly into the mdev/udev world; and RX handling is better (throttling works, and low latency). Configurations with scripts setting up the /dev/ttygserial device node (with "experimental" major number) may want to change that to be a symlink pointing to the /dev/ttyGS0 file, as a migration aid; else, just switch entirely over to mdev/udev. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/usb/gadget_serial.txt35
1 files changed, 26 insertions, 9 deletions
diff --git a/Documentation/usb/gadget_serial.txt b/Documentation/usb/gadget_serial.txt
index 815f5c2301ff..9b22bd14c348 100644
--- a/Documentation/usb/gadget_serial.txt
+++ b/Documentation/usb/gadget_serial.txt
@@ -1,6 +1,7 @@
1 1
2 Linux Gadget Serial Driver v2.0 2 Linux Gadget Serial Driver v2.0
3 11/20/2004 3 11/20/2004
4 (updated 8-May-2008 for v2.3)
4 5
5 6
6License and Disclaimer 7License and Disclaimer
@@ -31,7 +32,7 @@ Prerequisites
31------------- 32-------------
32Versions of the gadget serial driver are available for the 33Versions of the gadget serial driver are available for the
332.4 Linux kernels, but this document assumes you are using 342.4 Linux kernels, but this document assumes you are using
34version 2.0 or later of the gadget serial driver in a 2.6 35version 2.3 or later of the gadget serial driver in a 2.6
35Linux kernel. 36Linux kernel.
36 37
37This document assumes that you are familiar with Linux and 38This document assumes that you are familiar with Linux and
@@ -40,6 +41,12 @@ standard utilities, use minicom and HyperTerminal, and work with
40USB and serial devices. It also assumes you configure the Linux 41USB and serial devices. It also assumes you configure the Linux
41gadget and usb drivers as modules. 42gadget and usb drivers as modules.
42 43
44With version 2.3 of the driver, major and minor device nodes are
45no longer statically defined. Your Linux based system should mount
46sysfs in /sys, and use "mdev" (in Busybox) or "udev" to make the
47/dev nodes matching the sysfs /sys/class/tty files.
48
49
43 50
44Overview 51Overview
45-------- 52--------
@@ -104,15 +111,8 @@ driver. All this are listed under "USB Gadget Support" when
104configuring the kernel. Then rebuild and install the kernel or 111configuring the kernel. Then rebuild and install the kernel or
105modules. 112modules.
106 113
107The gadget serial driver uses major number 127, for now. So you
108will need to create a device node for it, like this:
109
110 mknod /dev/ttygserial c 127 0
111
112You only need to do this once.
113
114Then you must load the gadget serial driver. To load it as an 114Then you must load the gadget serial driver. To load it as an
115ACM device, do this: 115ACM device (recommended for interoperability), do this:
116 116
117 modprobe g_serial use_acm=1 117 modprobe g_serial use_acm=1
118 118
@@ -125,6 +125,23 @@ controller driver. This must be done each time you reboot the gadget
125side Linux system. You can add this to the start up scripts, if 125side Linux system. You can add this to the start up scripts, if
126desired. 126desired.
127 127
128Your system should use mdev (from busybox) or udev to make the
129device nodes. After this gadget driver has been set up you should
130then see a /dev/ttyGS0 node:
131
132 # ls -l /dev/ttyGS0 | cat
133 crw-rw---- 1 root root 253, 0 May 8 14:10 /dev/ttyGS0
134 #
135
136Note that the major number (253, above) is system-specific. If
137you need to create /dev nodes by hand, the right numbers to use
138will be in the /sys/class/tty/ttyGS0/dev file.
139
140When you link this gadget driver early, perhaps even statically,
141you may want to set up an /etc/inittab entry to run "getty" on it.
142The /dev/ttyGS0 line should work like most any other serial port.
143
144
128If gadget serial is loaded as an ACM device you will want to use 145If gadget serial is loaded as an ACM device you will want to use
129either the Windows or Linux ACM driver on the host side. If gadget 146either the Windows or Linux ACM driver on the host side. If gadget
130serial is loaded as a bulk in/out device, you will want to use the 147serial is loaded as a bulk in/out device, you will want to use the