xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-bus-pci-drivers-ehci_hcd (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/bus/pci/drivers/ehci_hcd/.../companion
2*4882a593Smuzhiyun		/sys/bus/usb/devices/usbN/../companion
3*4882a593SmuzhiyunDate:		January 2007
4*4882a593SmuzhiyunKernelVersion:	2.6.21
5*4882a593SmuzhiyunContact:	Alan Stern <stern@rowland.harvard.edu>
6*4882a593SmuzhiyunDescription:
7*4882a593Smuzhiyun		PCI-based EHCI USB controllers (i.e., high-speed USB-2.0
8*4882a593Smuzhiyun		controllers) are often implemented along with a set of
9*4882a593Smuzhiyun		"companion" full/low-speed USB-1.1 controllers.  When a
10*4882a593Smuzhiyun		high-speed device is plugged in, the connection is routed
11*4882a593Smuzhiyun		to the EHCI controller; when a full- or low-speed device
12*4882a593Smuzhiyun		is plugged in, the connection is routed to the companion
13*4882a593Smuzhiyun		controller.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun		Sometimes you want to force a high-speed device to connect
16*4882a593Smuzhiyun		at full speed, which can be accomplished by forcing the
17*4882a593Smuzhiyun		connection to be routed to the companion controller.
18*4882a593Smuzhiyun		That's what this file does.  Writing a port number to the
19*4882a593Smuzhiyun		file causes connections on that port to be routed to the
20*4882a593Smuzhiyun		companion controller, and writing the negative of a port
21*4882a593Smuzhiyun		number returns the port to normal operation.
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun		For example: To force the high-speed device attached to
24*4882a593Smuzhiyun		port 4 on bus 2 to run at full speed::
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun			echo 4 >/sys/bus/usb/devices/usb2/../companion
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun		To return the port to high-speed operation::
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun			echo -4 >/sys/bus/usb/devices/usb2/../companion
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun		Reading the file gives the list of ports currently forced
33*4882a593Smuzhiyun		to the companion controller.
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun		Note: Some EHCI controllers do not have companions; they
36*4882a593Smuzhiyun		may contain an internal "transaction translator" or they
37*4882a593Smuzhiyun		may be attached directly to a "rate-matching hub".  This
38*4882a593Smuzhiyun		mechanism will not work with such controllers.  Also, it
39*4882a593Smuzhiyun		cannot be used to force a port on a high-speed hub to
40*4882a593Smuzhiyun		connect at full speed.
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun		Note: When this file was first added, it appeared in a
43*4882a593Smuzhiyun		different sysfs directory.  The location given above is
44*4882a593Smuzhiyun		correct for 2.6.35 (and probably several earlier kernel
45*4882a593Smuzhiyun		versions as well).
46*4882a593Smuzhiyun
47