mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] Fix vbus draw of dwc3 gadget
@ 2023-02-23 12:41 Prashanth K
  2023-02-23 12:42 ` [PATCH v3 1/2] usb: dwc3: gadget: Change condition for processing suspend event Prashanth K
  2023-02-23 12:42 ` [PATCH v3 2/2] usb: gadget: composite: Draw 100mA current if not configured Prashanth K
  0 siblings, 2 replies; 9+ messages in thread
From: Prashanth K @ 2023-02-23 12:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Thinh Nguyen, Jakob Koschel,
	Jó Ágila Bitsch, Alan Stern
  Cc: Pratham Pratap, Jack Pham, linux-usb, linux-kernel, Prashanth K

Changes in v3
 - Fixed minor syntax error and warnings

Changes in v2
 - Added min() calculation against CONFIG_USB_GADGET_VBUS_DRAW in case
  of unconfigured state.

Currently dwc3 gadget processes the suspend interrupt event only
if the device is in configured state. But consider a case where
device is not configured and got suspend interrupt, in that case
our gadget would still use 100mA as composite_suspend didn't happen.
But battery charging specification (BC1.2) expects a downstream
device to draw less than 2.5mA when unconnected OR suspended.

And while resuming, the gadget can draw upto 100mA if its not
configured, but the current implementation of composite_resume
doesn't consider the case of unconfigured device. This series
addresses the above mentioned issues.

Prashanth K (2):
  usb: dwc3: gadget: Change condition for processing suspend event
  usb: gadget: composite: Draw 100mA current if not configured

 drivers/usb/dwc3/gadget.c      | 11 ++---------
 drivers/usb/gadget/composite.c |  4 ++++
 2 files changed, 6 insertions(+), 9 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-02-27 19:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-23 12:41 [PATCH v3 0/2] Fix vbus draw of dwc3 gadget Prashanth K
2023-02-23 12:42 ` [PATCH v3 1/2] usb: dwc3: gadget: Change condition for processing suspend event Prashanth K
2023-02-23 20:03   ` Thinh Nguyen
2023-02-23 12:42 ` [PATCH v3 2/2] usb: gadget: composite: Draw 100mA current if not configured Prashanth K
2023-02-23 20:10   ` Thinh Nguyen
2023-02-24  4:57     ` Prashanth K
2023-02-24 18:38       ` Thinh Nguyen
2023-02-25  6:35         ` Prashanth K
2023-02-27 19:38           ` Thinh Nguyen

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®