public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	Mark Brown <broonie@kernel.org>, USB <linux-usb@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on
Date: Fri, 13 May 2016 15:46:24 +0300	[thread overview]
Message-ID: <871t56qg67.fsf@linux.intel.com> (raw)
In-Reply-To: <CAMz4kuKNeu-irhcOav0a_Dp2nHN-ve5aLa0zuqPp3+XS002Z2A@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1499 bytes --]


Hi,

Baolin Wang <baolin.wang@linaro.org> writes:
>>>> why does it need restart? Why is dwc3 powered off? Who powers it off?
>>>
>>> Because when the dwc3 Vbus is off (no cable pluging in now),
>>> especially for some mobile device, the system need to power off the
>>> dwc3 to save power in this situation.
>>
>> but dwc3 doesn't do this by itself, so who's doing it?
>
> Yes, the dwc3 clock is controlled by the Soc system, so the Soc system
> can disable the dwc3 clock when there is no cable plugging in.

understood.

>>>> This looks like a *really* bad power management implementation. Do you
>>>> have hibernation enabled? Do you have Clock gating enabled? Which dwc3
>>>> version are you using? How was it configured?
>>>
>>> This is not hibernation, we want to power off the dwc3 to save power
>>> when no cable plugging in. Yes, we have clock gating, at this
>>> situation we will disable the clock and shutdown the phy to save
>>> power. For mobile device, most time no cable plugging in, so we need
>>> to think about the power consuming. How do you think this requirement?
>>
>> Well, seems like you're missing *proper* runtime PM. I've been meaning
>> to work on it for weeks, but I still have a few other things to do
>> before I get to that. In any case, we don't need to do what you did
>> here. There are better ways.
>
> Make sense.

cool, if you wanna work on it, let me know and I can give some details
of what I have in mind.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

  reply	other threads:[~2016-05-13 12:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 10:24 [PATCH] dwc3: gadget: Defer starting the gadget device until gadget is power on Baolin Wang
2016-05-13 10:40 ` Felipe Balbi
2016-05-13 11:34   ` Baolin Wang
2016-05-13 12:09     ` Felipe Balbi
2016-05-13 12:35       ` Baolin Wang
2016-05-13 12:46         ` Felipe Balbi [this message]
2016-05-15  5:24           ` Baolin Wang
2016-05-17  7:56           ` Baolin Wang
2016-05-17  8:00             ` Felipe Balbi
2016-05-17  8:45               ` Baolin Wang
2016-05-17  9:25                 ` Felipe Balbi
2016-05-17 10:47                   ` Baolin Wang
2016-05-18  9:59                     ` Baolin Wang
2016-05-18 10:12                       ` Felipe Balbi
2016-05-18 10:17                         ` Baolin Wang
2016-05-18 10:22                           ` Felipe Balbi
2016-05-18 11:06                             ` Baolin Wang
2016-05-18 11:21                               ` Felipe Balbi
2016-05-18 11:26                                 ` Baolin Wang

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=871t56qg67.fsf@linux.intel.com \
    --to=balbi@kernel.org \
    --cc=baolin.wang@linaro.org \
    --cc=broonie@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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