Some devices are connected to standard downstream ports (SDP) and draw current from them. The current rates are defined in the BC1.2 specification, and highlights the different charge rates depending on the device state. The DWC3 gadget does not currently have a mechanism to notify external drivers about how much current can be drawn. The current rates are notified by the USB gadget layer, and the DWC3 gadget will propagate this potentially to external charger drivers. Also, the USB gadget needs to be fixed to only allow 100mA current draw when receiving a bus reset from the host, as the BC1.2 specification states that this is the max current draw possible when in the connected and unconfigured state. Wesley Cheng (3): usb: dwc3: gadget: Introduce a DWC3 VBUS draw callback usb: gadget: composite: Split composite reset and disconnect usb: gadget: configfs: Add a specific configFS reset callback drivers/usb/dwc3/gadget.c | 11 +++++++++++ drivers/usb/gadget/composite.c | 21 +++++++++++++++++++-- drivers/usb/gadget/configfs.c | 24 +++++++++++++++++++++++- include/linux/usb/composite.h | 2 ++ 4 files changed, 55 insertions(+), 3 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project