mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Prashanth K <quic_prashk@quicinc.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jakob Koschel" <jakobkoschel@gmail.com>,
	"Jó Ágila Bitsch" <jgilab@gmail.com>,
	"Alan Stern" <stern@rowland.harvard.edu>,
	"Pratham Pratap" <quic_ppratap@quicinc.com>,
	"Jack Pham" <quic_jackp@quicinc.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] usb: gadget: composite: Draw 100mA current if not configured
Date: Sat, 25 Feb 2023 12:05:04 +0530	[thread overview]
Message-ID: <3a69b51c-9e2a-2d36-27cd-2619f9e3a356@quicinc.com> (raw)
In-Reply-To: <20230224183830.ox65eocunuvlp7zt@synopsys.com>



On 25-02-23 12:08 am, Thinh Nguyen wrote:
> On Fri, Feb 24, 2023, Prashanth K wrote:
>>
>>
>> On 24-02-23 01:40 am, Thinh Nguyen wrote:
>>> On Thu, Feb 23, 2023, Prashanth K wrote:
>>>> Currently we don't change the current value if device isn't in
>>>> configured state. But the battery charging specification says,
>>>
>>> Can you provide the spec section also?
>>>
>> 1.2 Background
>> 1.4.13 Standard Downstream Port
>>
>> Did you mean to add these in the commit message?
> 
> Yes, it's better to have the reference in case we need to revisit this.
I have added it in v4 patch, thanks for pointing it out.
> 
>>>> device can draw up to 100mA of current if its in unconfigured
>>>
>>> Is this related to being self-powered?
> 
>> I think its applicable for bus-powered devices.
> 
> No, I mean before configured state, is the device considered
> self-powered? Since being self-powered means drawing 100mA or less, we
> can use USB_SELF_POWER_VBUS_MAX_DRAW to provide more context. If it's
> totally unrelated, then you can ignore this.
> 
> Thanks,
> Thinh
As per my understanding, those are 2 different things. A self-powered 
device isn't allowed to draw more than 100mA. And an unconfigured device
isn't allowed to draw more than 100mA (in HS). One thing that I recently 
found out is that, as per usb3.0 spec, SS device can only draw up to 
150mA if its unconfigured state. So i have to check the speed and set 
the current values accordingly.

Thanks,
Prashanth K

  reply	other threads:[~2023-02-25  6:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2023-02-27 19:38           ` Thinh Nguyen

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=3a69b51c-9e2a-2d36-27cd-2619f9e3a356@quicinc.com \
    --to=quic_prashk@quicinc.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jakobkoschel@gmail.com \
    --cc=jgilab@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_jackp@quicinc.com \
    --cc=quic_ppratap@quicinc.com \
    --cc=stern@rowland.harvard.edu \
    /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®