From: Prashanth K <prashanth.k@oss.qualcomm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Simona Vetter <simona.vetter@ffwll.ch>,
Takashi Iwai <tiwai@suse.de>
Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Prashanth K <prashanth.k@oss.qualcomm.com>
Subject: [PATCH] usb: gadget: Increase the limit of USB_GADGET_VBUS_DRAW to 900mA
Date: Mon, 20 Jan 2025 16:47:02 +0530 [thread overview]
Message-ID: <20250120111702.3738161-1-prashanth.k@oss.qualcomm.com> (raw)
Currently CONFIG_USB_GADGET_VBUS_DRAW limits the maximum current
drawn from Vbus to be up to 500mA. However USB gadget operating
in SuperSpeed or higher can draw up to 900mA. Also, MaxPower in
ConfigFS takes its default value from this config. Hence increase
the allowed range of CONFIG_USB_GADGET_VBUS_DRAW to 900mA.
Signed-off-by: Prashanth K <prashanth.k@oss.qualcomm.com>
---
drivers/usb/gadget/Kconfig | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
index 76521555e3c1..904652c37385 100644
--- a/drivers/usb/gadget/Kconfig
+++ b/drivers/usb/gadget/Kconfig
@@ -97,8 +97,8 @@ config USB_GADGET_DEBUG_FS
to conserve kernel memory, say "N".
config USB_GADGET_VBUS_DRAW
- int "Maximum VBUS Power usage (2-500 mA)"
- range 2 500
+ int "Maximum VBUS Power usage (2-900 mA)"
+ range 2 900
default 2
help
Some devices need to draw power from USB when they are
@@ -107,8 +107,11 @@ config USB_GADGET_VBUS_DRAW
such as an AC adapter or batteries.
Enter the maximum power your device draws through USB, in
- milliAmperes. The permitted range of values is 2 - 500 mA;
- 0 mA would be legal, but can make some hosts misbehave.
+ milliAmperes. The permitted range of values depends on the
+ connection speed, for SuperSpeed and higher it's 2 - 900 mA,
+ but connections with High-Speed or slower can draw power
+ ranging from 2 - 500 mA; 0 mA would be legal, but can make
+ some hosts misbehave.
This value will be used except for system-specific gadget
drivers that have more specific information.
--
2.25.1
next reply other threads:[~2025-01-20 11:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 11:17 Prashanth K [this message]
2025-01-20 14:47 ` Alan Stern
2025-01-21 4:20 ` Prashanth K
2025-01-21 15:06 ` Alan Stern
2025-01-21 16:49 ` Prashanth K
2025-01-21 19:26 ` Alan Stern
2025-01-22 4:02 ` Prashanth K
2025-02-20 4:17 ` Prashanth K
2025-02-20 15:15 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250120111702.3738161-1-prashanth.k@oss.qualcomm.com \
--to=prashanth.k@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=simona.vetter@ffwll.ch \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®