[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150514155455.GE24269@saruman.tx.rr.com>
Date: Thu, 14 May 2015 10:54:55 -0500
From: Felipe Balbi <balbi@...com>
To: Alan Stern <stern@...land.harvard.edu>
CC: Felipe Balbi <balbi@...com>, Tony Lindgren <tony@...mide.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Andreas Fenkart <afenkart@...il.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Huiquan Zhong <huiquan.zhong@...el.com>,
Kevin Hilman <khilman@...nel.org>, NeilBrown <neilb@...e.de>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
Nishanth Menon <nm@...com>,
Peter Hurley <peter@...leysoftware.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Ulf Hansson <ulf.hansson@...aro.org>,
Thomas Gleixner <tglx@...utronix.de>,
<linux-pm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-serial@...r.kernel.org>, <linux-omap@...r.kernel.org>
Subject: Re: [PATCH 2/5] PM / Wakeirq: Add automated device wake IRQ handling
On Thu, May 14, 2015 at 11:51:10AM -0400, Alan Stern wrote:
> On Wed, 13 May 2015, Felipe Balbi wrote:
>
> > This brings up a question, actually. What to do with devices which were
> > already runtime suspended when user initiated suspend-to-ram ? Do we
> > leave wakeups enabled, or do we revisit device_may_wakeup() and
> > conditionally runtime_resume the device, disable wakeup, and let its
> > ->suspend() callback be called ?
>
> In theory, the subsystem/device drivers already have code do this.
> They're supposed to, anyway. The USB host stack does it in
> drivers/usb/core/driver.c:choose_wakeup().
that answers the question, specifically, this comment and piece of code
do:
1395 static void choose_wakeup(struct usb_device *udev, pm_message_t msg)
1396 {
[...]
1409 /* Enable remote wakeup if it is allowed, even if no interface drivers
1410 * actually want it.
1411 */
1412 w = device_may_wakeup(&udev->dev);
1413
1414 /* If the device is autosuspended with the wrong wakeup setting,
1415 * autoresume now so the setting can be changed.
1416 */
1417 if (udev->state == USB_STATE_SUSPENDED && w != udev->do_remote_wakeup)
1418 pm_runtime_resume(&udev->dev);
1419 udev->do_remote_wakeup = w;
1420 }
so that's something that also needs to be taken into consideration.
Thanks
--
balbi
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists