xref: /OK3568_Linux_fs/kernel/drivers/usb/core/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun#
3*4882a593Smuzhiyun# USB Core configuration
4*4882a593Smuzhiyun#
5*4882a593Smuzhiyunconfig USB_ANNOUNCE_NEW_DEVICES
6*4882a593Smuzhiyun	bool "USB announce new devices"
7*4882a593Smuzhiyun	help
8*4882a593Smuzhiyun	  Say Y here if you want the USB core to always announce the
9*4882a593Smuzhiyun	  idVendor, idProduct, Manufacturer, Product, and SerialNumber
10*4882a593Smuzhiyun	  strings for every new USB device to the syslog.  This option is
11*4882a593Smuzhiyun	  usually used by distro vendors to help with debugging and to
12*4882a593Smuzhiyun	  let users know what specific device was added to the machine
13*4882a593Smuzhiyun	  in what location.
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun	  If you do not want this kind of information sent to the system
16*4882a593Smuzhiyun	  log, or have any doubts about this, say N here.
17*4882a593Smuzhiyun
18*4882a593Smuzhiyuncomment "Miscellaneous USB options"
19*4882a593Smuzhiyun
20*4882a593Smuzhiyunconfig USB_DEFAULT_PERSIST
21*4882a593Smuzhiyun	bool "Enable USB persist by default"
22*4882a593Smuzhiyun	default y
23*4882a593Smuzhiyun	help
24*4882a593Smuzhiyun	  Say N here if you don't want USB power session persistence
25*4882a593Smuzhiyun	  enabled by default.  If you say N it will make suspended USB
26*4882a593Smuzhiyun	  devices that lose power get reenumerated as if they had been
27*4882a593Smuzhiyun	  unplugged, causing any mounted filesystems to be lost.  The
28*4882a593Smuzhiyun	  persist feature can still be enabled for individual devices
29*4882a593Smuzhiyun	  through the power/persist sysfs node. See
30*4882a593Smuzhiyun	  Documentation/driver-api/usb/persist.rst for more info.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun	  If you have any questions about this, say Y here, only say N
33*4882a593Smuzhiyun	  if you know exactly what you are doing.
34*4882a593Smuzhiyun
35*4882a593Smuzhiyunconfig USB_FEW_INIT_RETRIES
36*4882a593Smuzhiyun	bool "Limit USB device initialization to only a few retries"
37*4882a593Smuzhiyun	help
38*4882a593Smuzhiyun	  When a new USB device is detected, the kernel tries very hard
39*4882a593Smuzhiyun	  to initialize and enumerate it, with lots of nested retry loops.
40*4882a593Smuzhiyun	  This almost always works, but when it fails it can take a long time.
41*4882a593Smuzhiyun	  This option tells the kernel to make only a few retry attempts,
42*4882a593Smuzhiyun	  so that the total time required for a failed initialization is
43*4882a593Smuzhiyun	  no more than 30 seconds (as required by the USB OTG spec).
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun	  Say N here unless you require new-device enumeration failure to
46*4882a593Smuzhiyun	  occur within 30 seconds (as might be needed in an embedded
47*4882a593Smuzhiyun	  application).
48*4882a593Smuzhiyun
49*4882a593Smuzhiyunconfig USB_DYNAMIC_MINORS
50*4882a593Smuzhiyun	bool "Dynamic USB minor allocation"
51*4882a593Smuzhiyun	help
52*4882a593Smuzhiyun	  If you say Y here, the USB subsystem will use dynamic minor
53*4882a593Smuzhiyun	  allocation for any device that uses the USB major number.
54*4882a593Smuzhiyun	  This means that you can have more than 16 of a single type
55*4882a593Smuzhiyun	  of device (like USB printers).
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun	  If you are unsure about this, say N here.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyunconfig USB_OTG
60*4882a593Smuzhiyun	bool "OTG support"
61*4882a593Smuzhiyun	depends on PM
62*4882a593Smuzhiyun	help
63*4882a593Smuzhiyun	  The most notable feature of USB OTG is support for a
64*4882a593Smuzhiyun	  "Dual-Role" device, which can act as either a device
65*4882a593Smuzhiyun	  or a host. The initial role is decided by the type of
66*4882a593Smuzhiyun	  plug inserted and can be changed later when two dual
67*4882a593Smuzhiyun	  role devices talk to each other.
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun	  Select this only if your board has Mini-AB/Micro-AB
70*4882a593Smuzhiyun	  connector.
71*4882a593Smuzhiyun
72*4882a593Smuzhiyunconfig USB_OTG_PRODUCTLIST
73*4882a593Smuzhiyun	bool "Rely on OTG and EH Targeted Peripherals List"
74*4882a593Smuzhiyun	depends on USB
75*4882a593Smuzhiyun	help
76*4882a593Smuzhiyun	  If you say Y here, the "otg_productlist.h" file will be used as a
77*4882a593Smuzhiyun	  product list, so USB peripherals not listed there will be
78*4882a593Smuzhiyun	  rejected during enumeration.  This behavior is required by the
79*4882a593Smuzhiyun	  USB OTG and EH specification for all devices not on your product's
80*4882a593Smuzhiyun	  "Targeted Peripherals List".  "Embedded Hosts" are likewise
81*4882a593Smuzhiyun	  allowed to support only a limited number of peripherals.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyunconfig USB_OTG_DISABLE_EXTERNAL_HUB
84*4882a593Smuzhiyun	bool "Disable external hubs"
85*4882a593Smuzhiyun	depends on USB_OTG || EXPERT
86*4882a593Smuzhiyun	help
87*4882a593Smuzhiyun	  If you say Y here, then Linux will refuse to enumerate
88*4882a593Smuzhiyun	  external hubs.  OTG hosts are allowed to reduce hardware
89*4882a593Smuzhiyun	  and software costs by not supporting external hubs.  So
90*4882a593Smuzhiyun	  are "Embedded Hosts" that don't offer OTG support.
91*4882a593Smuzhiyun
92*4882a593Smuzhiyunconfig USB_OTG_FSM
93*4882a593Smuzhiyun	tristate "USB 2.0 OTG FSM implementation"
94*4882a593Smuzhiyun	depends on USB && USB_OTG
95*4882a593Smuzhiyun	select USB_PHY
96*4882a593Smuzhiyun	help
97*4882a593Smuzhiyun	  Implements OTG Finite State Machine as specified in On-The-Go
98*4882a593Smuzhiyun	  and Embedded Host Supplement to the USB Revision 2.0 Specification.
99*4882a593Smuzhiyun
100*4882a593Smuzhiyunconfig USB_LEDS_TRIGGER_USBPORT
101*4882a593Smuzhiyun	tristate "USB port LED trigger"
102*4882a593Smuzhiyun	depends on USB && LEDS_TRIGGERS
103*4882a593Smuzhiyun	help
104*4882a593Smuzhiyun	  This driver allows LEDs to be controlled by USB events. Enabling this
105*4882a593Smuzhiyun	  trigger allows specifying list of USB ports that should turn on LED
106*4882a593Smuzhiyun	  when some USB device gets connected.
107*4882a593Smuzhiyun
108*4882a593Smuzhiyunconfig USB_AUTOSUSPEND_DELAY
109*4882a593Smuzhiyun	int "Default autosuspend delay"
110*4882a593Smuzhiyun	depends on USB
111*4882a593Smuzhiyun	default 2
112*4882a593Smuzhiyun	help
113*4882a593Smuzhiyun	  The default autosuspend delay in seconds.  Can be overridden
114*4882a593Smuzhiyun	  with the usbcore.autosuspend command line or module parameter.
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun	  The default value Linux has always had is 2 seconds.  Change
117*4882a593Smuzhiyun	  this value if you want a different delay and cannot modify
118*4882a593Smuzhiyun	  the command line or module parameter.
119