linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: Felipe Balbi <balbi@ti.com>
Cc: Douglas Anderson <dianders@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	John Youn <johnyoun@synopsys.com>, <linux-usb@vger.kernel.org>,
	Chris Zhong <zyw@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Julius Werner <jwerner@chromium.org>,
	Andrew Bresticker <abrestic@chromium.org>,
	Alexandru Stan <amstan@chromium.org>, <lyz@rock-chips.com>,
	<linux-rockchip@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled
Date: Tue, 7 Jul 2015 10:28:34 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.1507071020310.1692-100000@iolanthe.rowland.org> (raw)
In-Reply-To: <20150706190212.GN20779@saruman.tx.rr.com>

On Mon, 6 Jul 2015, Felipe Balbi wrote:

> > You know, this is the first time I've run across this optimization.
> > 
> > In principle it applies to any USB host controller, not just to PHYs.  
> > There's no reason to enable wakeup for a controller if none of the 
> > attached devices can issue a wakeup request.
> > 
> > I don't know if implementing this in other HCDs would save any power.  
> > Any ideas?
> 
> most likely it would. Enabling wakeup usually boils down to keeping a
> tiny part of the controller (or PHY) powered up. Sometimes that lies in
> an always-on power domain, so there would be no difference.

Doug, how would you feel about reworking the patch that exports
usb_wakeup_enabled_descendants()?  Instead of doing it that way, create
and export a new subroutine in hcd.c called
usb_hcd_wakeup_not_needed(), or something similar.

The idea is that a host controller driver can do something like this:

	do_wakeup = device_may_wakeup(...);
	if (usb_hcd_wakeup_not_needed(hcd))
		do_wakeup = false;

It encapsulates what you want in a form that can easily be used by 
every HCD.  We can then add this call into the HCDs, over time.

(Merging a change like this would be a challenge.  I guess Felipe would
have to put it in a separate branch which Greg could pull, or vice
versa, so that the new routine would be available to patches submitted
to either maintainer.)

Alan Stern


  parent reply	other threads:[~2015-07-07 14:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06 18:27 [REPOST PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288 Douglas Anderson
2015-07-06 18:27 ` [REPOST PATCH 1/3] USB: Export usb_wakeup_enabled_descendants() Douglas Anderson
2015-07-06 18:27 ` [REPOST PATCH 2/3] Documentation: dt-bindings: Add snps,need-phy-for-wake for dwc2 USB Douglas Anderson
2015-07-06 18:27 ` [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled Douglas Anderson
2015-07-06 18:34   ` Felipe Balbi
2015-07-06 19:32     ` Doug Anderson
2015-07-06 19:35       ` Felipe Balbi
2015-07-06 18:58   ` Alan Stern
2015-07-06 19:02     ` Felipe Balbi
2015-07-06 19:39       ` Doug Anderson
2015-07-07 14:28       ` Alan Stern [this message]
2015-07-08  0:06         ` Julius Werner
2015-07-08 15:01           ` Alan Stern
2015-07-08 19:41             ` Julius Werner
2015-07-08 19:58               ` Alan Stern
2015-10-21 16:23 ` [REPOST PATCH 0/3] dwc2 patches to allow wakeup on Rockchip rk3288 Doug Anderson
2015-10-27  2:05   ` John Youn
2015-10-31  0:01     ` Doug Anderson

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=Pine.LNX.4.44L0.1507071020310.1692-100000@iolanthe.rowland.org \
    --to=stern@rowland.harvard.edu \
    --cc=abrestic@chromium.org \
    --cc=amstan@chromium.org \
    --cc=balbi@ti.com \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=johnyoun@synopsys.com \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lyz@rock-chips.com \
    --cc=zyw@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).