Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934861AbbGHPBK (ORCPT ); Wed, 8 Jul 2015 11:01:10 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:53330 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754805AbbGHPBH (ORCPT ); Wed, 8 Jul 2015 11:01:07 -0400 Date: Wed, 8 Jul 2015 11:01:06 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Julius Werner cc: Felipe Balbi , Douglas Anderson , Greg Kroah-Hartman , John Youn , "linux-usb@vger.kernel.org" , Chris Zhong , Heiko Stuebner , Andrew Bresticker , Alexandru Stan , lyz , "open list:ARM/Rockchip SoC..." , LKML Subject: Re: [REPOST PATCH 3/3] USB: dwc2: Don't turn off the usbphy in suspend if wakeup is enabled In-Reply-To: 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 Content-Length: 1326 Lines: 32 On Tue, 7 Jul 2015, Julius Werner wrote: > > 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. > > We have a use case with another host controller (Tegra, which I think > is still in the process of being upstreamed) where we are able to > power down PHYs (and thus reduce power consumption) per port. I think > we should prefer the more flexible 'number of wake devices in subtree' > interface to be able to support cases like that. (And for the simple > case, 'if (usb_hcd_wakeup_not_needed(hcd))' and 'if > (!usb_wakeup_enabled_descendants(hcd->self.root_hub))' look pretty > similar anyway.) Okay, that's a good point. But I don't see how you will make it work when the root hub itself is not enabled for wakeup and a non-hub device plugged into one of the root hub's ports is enabled. It seems like you would need a usb_hcd_wakeup_not_needed(hcd, port) subroutine. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/