Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752208AbbDCU71 (ORCPT ); Fri, 3 Apr 2015 16:59:27 -0400 Received: from v094114.home.net.pl ([79.96.170.134]:57868 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750739AbbDCU7Z (ORCPT ); Fri, 3 Apr 2015 16:59:25 -0400 From: "Rafael J. Wysocki" To: Dmitry Torokhov Cc: Tomeu Vizoso , linux-pm@vger.kernel.org, Greg Kroah-Hartman , Scot Doyle , Alan Stern , Dan Williams , Julius Werner , "Rafael J. Wysocki" , Viresh Kumar , Sebastian Andrzej Siewior , Pratyush Anand , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 7/7] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Date: Fri, 03 Apr 2015 23:23:32 +0200 Message-ID: <1670645.XN7urnStQD@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.19.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150403204436.GB19867@dtor-ws> References: <1428065887-16017-1-git-send-email-tomeu.vizoso@collabora.com> <1428065887-16017-8-git-send-email-tomeu.vizoso@collabora.com> <20150403204436.GB19867@dtor-ws> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1292 Lines: 31 On Friday, April 03, 2015 01:44:36 PM Dmitry Torokhov wrote: > Hi Tomeu, > > On Fri, Apr 03, 2015 at 02:57:56PM +0200, Tomeu Vizoso wrote: > > Have dev_pm_ops.prepare return 1 for USB devices, interfaces, endpoints > > and ports so that USB devices can remain runtime-suspended when the > > system goes to a sleep state, if their wakeup state is correct. > > > > Also enable runtime PM for endpoints, which is another requirement for > > the above to work. > > After patching I think the 4th unrelated subsystem with stubs for > prepare() I think it is pretty clear that this approach is not the right > one. > > If your driver does not care about any children hanging off it there is > dev->ignore_children flag that either already does what you want, or > maybe needs adjusted to support your use case. I wouldn't overload ignore_children with that meaning. That said adding a "return 1 from device_prepare() if this is set" flag might be a good idea. -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- 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/