Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d5d44de authored by Mans Rullgard's avatar Mans Rullgard Committed by Greg Kroah-Hartman
Browse files

usb: core: make default autosuspend delay configurable



Make the default autosuspend delay configurable at build time.
This is useful for systems that require a non-standard value as
it avoids relying on the command line being properly set.

Signed-off-by: default avatarMans Rullgard <mans@mansr.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 23f4e3d8
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -91,3 +91,15 @@ config USB_LEDS_TRIGGER_USBPORT
	  This driver allows LEDs to be controlled by USB events. Enabling this
	  trigger allows specifying list of USB ports that should turn on LED
	  when some USB device gets connected.

config USB_AUTOSUSPEND_DELAY
	int "Default autosuspend delay"
	depends on USB
	default 2
	help
	  The default autosuspend delay in seconds.  Can be overridden
	  with the usbcore.autosuspend command line or module parameter.

	  The default value Linux has always had is 2 seconds.  Change
	  this value if you want a different delay and cannot modify
	  the command line or module parameter.
+2 −2
Original line number Diff line number Diff line
@@ -64,8 +64,8 @@ int usb_disabled(void)
EXPORT_SYMBOL_GPL(usb_disabled);

#ifdef	CONFIG_PM
static int usb_autosuspend_delay = 2;		/* Default delay value,
						 * in seconds */
/* Default delay value, in seconds */
static int usb_autosuspend_delay = CONFIG_USB_AUTOSUSPEND_DELAY;
module_param_named(autosuspend, usb_autosuspend_delay, int, 0644);
MODULE_PARM_DESC(autosuspend, "default autosuspend delay");