All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@ti.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Douglas Anderson <dianders@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	John Youn <johnyoun@synopsys.com>, Felipe Balbi <balbi@ti.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: Mon, 6 Jul 2015 14:02:12 -0500	[thread overview]
Message-ID: <20150706190212.GN20779@saruman.tx.rr.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1507061450190.1860-100000@iolanthe.rowland.org>

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

On Mon, Jul 06, 2015 at 02:58:16PM -0400, Alan Stern wrote:
> On Mon, 6 Jul 2015, Douglas Anderson wrote:
> 
> > If the 'snps,need-phy-for-wake' is set in the device tree then:
> > 
> > - We know that we can wakeup, so call device_set_wakeup_capable().
> >   The USB core will use this knowledge to enable wakeup by default.
> > - We know that we should keep the PHY on during suspend if something
> >   on our root hub needs remote wakeup.  This requires the patch (USB:
> >   Export usb_wakeup_enabled_descendants()).  Note that we don't keep
> >   the PHY on at suspend time if it's not needed because it would be a
> >   power draw.
> 
> 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.

cheers

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
To: Alan Stern <stern-nwvwT67g6+6dFdvTe/nMLpVzexx5G7lz@public.gmane.org>
Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Douglas Anderson
	<dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andrew Bresticker
	<abrestic-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org,
	Chris Zhong <zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	Julius Werner <jwerner-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Alexandru Stan <amstan-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Subject: Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled
Date: Mon, 6 Jul 2015 14:02:12 -0500	[thread overview]
Message-ID: <20150706190212.GN20779@saruman.tx.rr.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1507061450190.1860-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 1246 bytes --]

On Mon, Jul 06, 2015 at 02:58:16PM -0400, Alan Stern wrote:
> On Mon, 6 Jul 2015, Douglas Anderson wrote:
> 
> > If the 'snps,need-phy-for-wake' is set in the device tree then:
> > 
> > - We know that we can wakeup, so call device_set_wakeup_capable().
> >   The USB core will use this knowledge to enable wakeup by default.
> > - We know that we should keep the PHY on during suspend if something
> >   on our root hub needs remote wakeup.  This requires the patch (USB:
> >   Export usb_wakeup_enabled_descendants()).  Note that we don't keep
> >   the PHY on at suspend time if it's not needed because it would be a
> >   power draw.
> 
> 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.

cheers

-- 
balbi

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 200 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  reply	other threads:[~2015-07-06 19:02 UTC|newest]

Thread overview: 35+ 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 ` Douglas Anderson
2015-07-06 18:27 ` [REPOST PATCH 1/3] USB: Export usb_wakeup_enabled_descendants() Douglas Anderson
2015-07-06 18:27   ` 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   ` 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:27   ` Douglas Anderson
2015-07-06 18:34   ` Felipe Balbi
2015-07-06 18:34     ` Felipe Balbi
2015-07-06 19:32     ` Doug Anderson
2015-07-06 19:32       ` Doug Anderson
2015-07-06 19:35       ` Felipe Balbi
2015-07-06 19:35         ` Felipe Balbi
2015-07-06 18:58   ` Alan Stern
2015-07-06 18:58     ` Alan Stern
2015-07-06 19:02     ` Felipe Balbi [this message]
2015-07-06 19:02       ` Felipe Balbi
2015-07-06 19:39       ` Doug Anderson
2015-07-06 19:39         ` Doug Anderson
2015-07-07 14:28       ` Alan Stern
2015-07-07 14:28         ` Alan Stern
2015-07-08  0:06         ` Julius Werner
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:41               ` Julius Werner
2015-07-08 19:58               ` Alan Stern
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-21 16:23   ` Doug Anderson
2015-10-27  2:05   ` John Youn
2015-10-27  2:05     ` John Youn
2015-10-31  0:01     ` Doug Anderson
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=20150706190212.GN20779@saruman.tx.rr.com \
    --to=balbi@ti.com \
    --cc=abrestic@chromium.org \
    --cc=amstan@chromium.org \
    --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=stern@rowland.harvard.edu \
    --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 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.