Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104557
b: refs/heads/master
c: a7707ad
h: refs/heads/master
i:
  104555: fbf82ca
v: v3
  • Loading branch information
David Brownell authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 270bb55 commit dd7d268
Show file tree
Hide file tree
Showing 4 changed files with 160 additions and 1,383 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c1dca562be8ada614ef193aa246c6f8705bcd6b9
refs/heads/master: a7707adf9ee8de3c5b67e3793b98888f551ad00d
35 changes: 26 additions & 9 deletions trunk/Documentation/usb/gadget_serial.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

Linux Gadget Serial Driver v2.0
11/20/2004
(updated 8-May-2008 for v2.3)


License and Disclaimer
Expand Down Expand Up @@ -31,7 +32,7 @@ Prerequisites
-------------
Versions of the gadget serial driver are available for the
2.4 Linux kernels, but this document assumes you are using
version 2.0 or later of the gadget serial driver in a 2.6
version 2.3 or later of the gadget serial driver in a 2.6
Linux kernel.

This document assumes that you are familiar with Linux and
Expand All @@ -40,6 +41,12 @@ standard utilities, use minicom and HyperTerminal, and work with
USB and serial devices. It also assumes you configure the Linux
gadget and usb drivers as modules.

With version 2.3 of the driver, major and minor device nodes are
no longer statically defined. Your Linux based system should mount
sysfs in /sys, and use "mdev" (in Busybox) or "udev" to make the
/dev nodes matching the sysfs /sys/class/tty files.



Overview
--------
Expand Down Expand Up @@ -104,15 +111,8 @@ driver. All this are listed under "USB Gadget Support" when
configuring the kernel. Then rebuild and install the kernel or
modules.

The gadget serial driver uses major number 127, for now. So you
will need to create a device node for it, like this:

mknod /dev/ttygserial c 127 0

You only need to do this once.

Then you must load the gadget serial driver. To load it as an
ACM device, do this:
ACM device (recommended for interoperability), do this:

modprobe g_serial use_acm=1

Expand All @@ -125,6 +125,23 @@ controller driver. This must be done each time you reboot the gadget
side Linux system. You can add this to the start up scripts, if
desired.

Your system should use mdev (from busybox) or udev to make the
device nodes. After this gadget driver has been set up you should
then see a /dev/ttyGS0 node:

# ls -l /dev/ttyGS0 | cat
crw-rw---- 1 root root 253, 0 May 8 14:10 /dev/ttyGS0
#

Note that the major number (253, above) is system-specific. If
you need to create /dev nodes by hand, the right numbers to use
will be in the /sys/class/tty/ttyGS0/dev file.

When you link this gadget driver early, perhaps even statically,
you may want to set up an /etc/inittab entry to run "getty" on it.
The /dev/ttyGS0 line should work like most any other serial port.


If gadget serial is loaded as an ACM device you will want to use
either the Windows or Linux ACM driver on the host side. If gadget
serial is loaded as a bulk in/out device, you will want to use the
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/usb/gadget/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
#
g_zero-objs := zero.o usbstring.o config.o epautoconf.o
g_ether-objs := ether.o usbstring.o config.o epautoconf.o
g_serial-objs := serial.o usbstring.o config.o epautoconf.o
g_serial-objs := serial.o u_serial.o usbstring.o config.o epautoconf.o
g_midi-objs := gmidi.o usbstring.o config.o epautoconf.o
gadgetfs-objs := inode.o
g_file_storage-objs := file_storage.o usbstring.o config.o \
Expand Down
Loading

0 comments on commit dd7d268

Please sign in to comment.