diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2008-09-12 12:39:06 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:40:58 -0400 |
commit | 36e893d25aa2abcae0f11ef263de0e8322641386 (patch) | |
tree | f103a4c8e94dbd7bf5a04399e2a264893a3e1515 /drivers/usb/gadget/Kconfig | |
parent | 02582b92f60fa33b68b90263013e98550286db0a (diff) |
usb gadget: USB_GADGET_VBUS_DRAW Kconfig option
Offer a "how much VBUS power to request" configuration option
for USB gadgets that aren't using board-specific customization
of their gadget or (composite) configuration drivers.
Also remove a couple pointless "depends on USB_GADGET" bits
from the Kconfig text; booleans inside an "if USB_GADGET" will
already have that dependency.
Based on a patch from Justin Clacherty.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Justin Clacherty <justin@redfish-group.com>
Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/Kconfig')
-rw-r--r-- | drivers/usb/gadget/Kconfig | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index c0dfd9be3115..1a72715bce8a 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -45,7 +45,7 @@ if USB_GADGET | |||
45 | 45 | ||
46 | config USB_GADGET_DEBUG | 46 | config USB_GADGET_DEBUG |
47 | boolean "Debugging messages (DEVELOPMENT)" | 47 | boolean "Debugging messages (DEVELOPMENT)" |
48 | depends on USB_GADGET && DEBUG_KERNEL | 48 | depends on DEBUG_KERNEL |
49 | help | 49 | help |
50 | Many controller and gadget drivers will print some debugging | 50 | Many controller and gadget drivers will print some debugging |
51 | messages if you use this option to ask for those messages. | 51 | messages if you use this option to ask for those messages. |
@@ -59,7 +59,7 @@ config USB_GADGET_DEBUG | |||
59 | 59 | ||
60 | config USB_GADGET_DEBUG_FILES | 60 | config USB_GADGET_DEBUG_FILES |
61 | boolean "Debugging information files (DEVELOPMENT)" | 61 | boolean "Debugging information files (DEVELOPMENT)" |
62 | depends on USB_GADGET && PROC_FS | 62 | depends on PROC_FS |
63 | help | 63 | help |
64 | Some of the drivers in the "gadget" framework can expose | 64 | Some of the drivers in the "gadget" framework can expose |
65 | debugging information in files such as /proc/driver/udc | 65 | debugging information in files such as /proc/driver/udc |
@@ -70,7 +70,7 @@ config USB_GADGET_DEBUG_FILES | |||
70 | 70 | ||
71 | config USB_GADGET_DEBUG_FS | 71 | config USB_GADGET_DEBUG_FS |
72 | boolean "Debugging information files in debugfs (DEVELOPMENT)" | 72 | boolean "Debugging information files in debugfs (DEVELOPMENT)" |
73 | depends on USB_GADGET && DEBUG_FS | 73 | depends on DEBUG_FS |
74 | help | 74 | help |
75 | Some of the drivers in the "gadget" framework can expose | 75 | Some of the drivers in the "gadget" framework can expose |
76 | debugging information in files under /sys/kernel/debug/. | 76 | debugging information in files under /sys/kernel/debug/. |
@@ -79,6 +79,23 @@ config USB_GADGET_DEBUG_FS | |||
79 | Enable these files by choosing "Y" here. If in doubt, or | 79 | Enable these files by choosing "Y" here. If in doubt, or |
80 | to conserve kernel memory, say "N". | 80 | to conserve kernel memory, say "N". |
81 | 81 | ||
82 | config USB_GADGET_VBUS_DRAW | ||
83 | int "Maximum VBUS Power usage (2-500 mA)" | ||
84 | range 2 500 | ||
85 | default 2 | ||
86 | help | ||
87 | Some devices need to draw power from USB when they are | ||
88 | configured, perhaps to operate circuitry or to recharge | ||
89 | batteries. This is in addition to any local power supply, | ||
90 | such as an AC adapter or batteries. | ||
91 | |||
92 | Enter the maximum power your device draws through USB, in | ||
93 | milliAmperes. The permitted range of values is 2 - 500 mA; | ||
94 | 0 mA would be legal, but can make some hosts misbehave. | ||
95 | |||
96 | This value will be used except for system-specific gadget | ||
97 | drivers that have more specific information. | ||
98 | |||
82 | config USB_GADGET_SELECTED | 99 | config USB_GADGET_SELECTED |
83 | boolean | 100 | boolean |
84 | 101 | ||