Commit 87a065fb authored by Prashanth K's avatar Prashanth K Committed by Treehugger Robot
Browse files

UPSTREAM: usb: dwc3: gadget: Change condition for processing suspend event



Currently we process the suspend interrupt event only if the
device is in configured state. Consider a case where device
is not configured and got suspend interrupt, in that case our
gadget will 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.

Fix this by removing the condition for processing suspend event,
and thus composite_resume would set vbus draw to 2.

Fixes: 72704f87 ("dwc3: gadget: Implement the suspend entry event handler")
Signed-off-by: default avatarPrashanth K <quic_prashk@quicinc.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/1677217619-10261-2-git-send-email-quic_prashk@quicinc.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 272680990
(cherry picked from commit 4decf406
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git/

 usb-next)

Change-Id: I902b8911debb7c049a4a0128077ea8d931900d1d
Signed-off-by: default avatarPrashanth K <quic_prashk@quicinc.com>
parent 26638f8e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment