All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wesley Cheng <wcheng@codeaurora.org>
To: peter.chen@nxp.com, balbi@kernel.org, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	Wesley Cheng <wcheng@codeaurora.org>
Subject: [PATCH 0/3] Add vbus draw support to DWC3
Date: Tue, 29 Dec 2020 15:03:28 -0800	[thread overview]
Message-ID: <1609283011-21997-1-git-send-email-wcheng@codeaurora.org> (raw)

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


             reply	other threads:[~2020-12-29 23:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-29 23:03 Wesley Cheng [this message]
2020-12-29 23:03 ` [PATCH 1/3] usb: dwc3: gadget: Introduce a DWC3 VBUS draw callback Wesley Cheng
2020-12-29 23:03 ` [PATCH 2/3] usb: gadget: composite: Split composite reset and disconnect Wesley Cheng
2021-01-05 13:14   ` Felipe Balbi
2021-01-08  2:19     ` Thinh Nguyen
2021-01-08  8:35       ` Jack Pham
2021-01-08 22:04         ` Thinh Nguyen
2021-01-08  9:13       ` gregkh
2021-01-08 22:13         ` Thinh Nguyen
2020-12-29 23:03 ` [PATCH 3/3] usb: gadget: configfs: Add a specific configFS reset callback Wesley Cheng
2021-01-04 15:45   ` Greg KH
2021-01-04 19:03     ` Wesley Cheng
  -- strict thread matches above, loose matches on Subject: below --
2020-11-14  8:12 [PATCH 0/3] Add vbus draw support to DWC3 Wesley Cheng

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=1609283011-21997-1-git-send-email-wcheng@codeaurora.org \
    --to=wcheng@codeaurora.org \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@nxp.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.