xref: /openbmc/linux/drivers/usb/core/Kconfig (revision f42b3800)
1#
2# USB Core configuration
3#
4config USB_DEBUG
5	bool "USB verbose debug messages"
6	depends on USB
7	help
8	  Say Y here if you want the USB core & hub drivers to produce a bunch
9	  of debug messages to the system log. Select this if you are having a
10	  problem with USB support and want to see more of what is going on.
11
12config USB_ANNOUNCE_NEW_DEVICES
13	bool "USB announce new devices"
14	depends on USB
15	default N
16	help
17	  Say Y here if you want the USB core to always announce the
18	  idVendor, idProduct, Manufacturer, Product, and SerialNumber
19	  strings for every new USB device to the syslog.  This option is
20	  usually used by distro vendors to help with debugging and to
21	  let users know what specific device was added to the machine
22	  in what location.
23
24	  If you do not want this kind of information sent to the system
25	  log, or have any doubts about this, say N here.
26
27comment "Miscellaneous USB options"
28	depends on USB
29
30config USB_DEVICEFS
31	bool "USB device filesystem"
32	depends on USB
33	---help---
34	  If you say Y here (and to "/proc file system support" in the "File
35	  systems" section, above), you will get a file /proc/bus/usb/devices
36	  which lists the devices currently connected to your USB bus or
37	  busses, and for every connected device a file named
38	  "/proc/bus/usb/xxx/yyy", where xxx is the bus number and yyy the
39	  device number; the latter files can be used by user space programs
40	  to talk directly to the device. These files are "virtual", meaning
41	  they are generated on the fly and not stored on the hard drive.
42
43	  You may need to mount the usbfs file system to see the files, use
44	  mount -t usbfs none /proc/bus/usb
45
46	  For the format of the various /proc/bus/usb/ files, please read
47	  <file:Documentation/usb/proc_usb_info.txt>.
48
49	  Usbfs files can't handle Access Control Lists (ACL), which are the
50	  default way to grant access to USB devices for untrusted users of a
51	  desktop system. The usbfs functionality is replaced by real
52	  device-nodes managed by udev. These nodes live in /dev/bus/usb and
53	  are used by libusb.
54
55config USB_DEVICE_CLASS
56	bool "USB device class-devices (DEPRECATED)"
57	depends on USB
58	default y
59	---help---
60	  Userspace access to USB devices is granted by device-nodes exported
61	  directly from the usbdev in sysfs. Old versions of the driver
62	  core and udev needed additional class devices to export device nodes.
63
64	  These additional devices are difficult to handle in userspace, if
65	  information about USB interfaces must be available. One device
66	  contains the device node, the other device contains the interface
67	  data. Both devices are at the same level in sysfs (siblings) and one
68	  can't access the other. The device node created directly by the
69	  usb device is the parent device of the interface and therefore
70	  easily accessible from the interface event.
71
72	  This option provides backward compatibility for libusb device
73	  nodes (lsusb) when usbfs is not used, and the following udev rule
74	  doesn't exist:
75	    SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \
76	    NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644"
77
78config USB_DYNAMIC_MINORS
79	bool "Dynamic USB minor allocation (EXPERIMENTAL)"
80	depends on USB && EXPERIMENTAL
81	help
82	  If you say Y here, the USB subsystem will use dynamic minor
83	  allocation for any device that uses the USB major number.
84	  This means that you can have more than 16 of a single type
85	  of device (like USB printers).
86
87	  If you are unsure about this, say N here.
88
89config USB_SUSPEND
90	bool "USB selective suspend/resume and wakeup"
91	depends on USB && PM
92	help
93	  If you say Y here, you can use driver calls or the sysfs
94	  "power/level" file to suspend or resume individual USB
95	  peripherals and to enable or disable autosuspend (see
96	  Documentation/usb/power-management.txt for more details).
97
98	  Also, USB "remote wakeup" signaling is supported, whereby some
99	  USB devices (like keyboards and network adapters) can wake up
100	  their parent hub.  That wakeup cascades up the USB tree, and
101	  could wake the system from states like suspend-to-RAM.
102
103	  If you are unsure about this, say N here.
104
105config USB_PERSIST
106	bool "USB device persistence during system suspend (DANGEROUS)"
107	depends on USB && PM && EXPERIMENTAL
108	default n
109	help
110
111	  If you say Y here and enable the "power/persist" attribute
112	  for a USB device, the device's data structures will remain
113	  persistent across system suspend, even if the USB bus loses
114	  power.  (This includes hibernation, also known as swsusp or
115	  suspend-to-disk.)  The devices will reappear as if by magic
116	  when the system wakes up, with no need to unmount USB
117	  filesystems, rmmod host-controller drivers, or do anything
118	  else.
119
120	  	WARNING: This option can be dangerous!
121
122	  If a USB device is replaced by another of the same type while
123	  the system is asleep, there's a good chance the kernel won't
124	  detect the change.  Likewise if the media in a USB storage
125	  device is replaced.  When this happens it's almost certain to
126	  cause data corruption and maybe even crash your system.
127
128	  If you are unsure, say N here.
129
130config USB_OTG
131	bool
132	depends on USB && EXPERIMENTAL
133	select USB_SUSPEND
134	default n
135
136
137config USB_OTG_WHITELIST
138	bool "Rely on OTG Targeted Peripherals List"
139	depends on USB_OTG
140	default y
141	help
142	  If you say Y here, the "otg_whitelist.h" file will be used as a
143	  product whitelist, so USB peripherals not listed there will be
144	  rejected during enumeration.  This behavior is required by the
145	  USB OTG specification for all devices not on your product's
146	  "Targeted Peripherals List".
147
148	  Otherwise, peripherals not listed there will only generate a
149	  warning and enumeration will continue.  That's more like what
150	  normal Linux-USB hosts do (other than the warning), and is
151	  convenient for many stages of product development.
152
153config USB_OTG_BLACKLIST_HUB
154	bool "Disable external hubs"
155	depends on USB_OTG
156	help
157	  If you say Y here, then Linux will refuse to enumerate
158	  external hubs.  OTG hosts are allowed to reduce hardware
159	  and software costs by not supporting external hubs.
160
161