From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754627AbbGFS6X (ORCPT ); Mon, 6 Jul 2015 14:58:23 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:46002 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752281AbbGFS6R (ORCPT ); Mon, 6 Jul 2015 14:58:17 -0400 Date: Mon, 6 Jul 2015 14:58:16 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Douglas Anderson cc: Greg Kroah-Hartman , John Youn , Felipe Balbi , , Chris Zhong , Heiko Stuebner , Julius Werner , Andrew Bresticker , Alexandru Stan , , , Subject: Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled In-Reply-To: <1436207224-21849-4-git-send-email-dianders@chromium.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Alan Stern From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Stern 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:58:16 -0400 (EDT) Message-ID: References: <1436207224-21849-4-git-send-email-dianders@chromium.org> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <1436207224-21849-4-git-send-email-dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Douglas Anderson Cc: Greg Kroah-Hartman , John Youn , Felipe Balbi , linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Chris Zhong , Heiko Stuebner , Julius Werner , Andrew Bresticker , Alexandru Stan , lyz-TNX95d0MmH7DzftRWevZcw@public.gmane.org, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-rockchip.vger.kernel.org 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? Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html