All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	Linux-pm mailing list <linux-pm@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Scot Doyle <lkml14@scotdoyle.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Julius Werner <jwerner@chromium.org>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Pratyush Anand <pratyush.anand@st.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	USB list <linux-usb@vger.kernel.org>,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 6/6] USB / PM: Allow USB devices to remain runtime-suspended when sleeping
Date: Wed, 01 Apr 2015 16:26:46 +0200	[thread overview]
Message-ID: <1427898406.30440.12.camel@suse.de> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1504010959110.1420-100000@iolanthe.rowland.org>

On Wed, 2015-04-01 at 10:01 -0400, Alan Stern wrote:
> On Wed, 1 Apr 2015, Oliver Neukum wrote:
> 
> > On Tue, 2015-03-31 at 13:09 -0400, Alan Stern wrote:
> > > In other words, if the device is currently in runtime suspend with 
> > > remote wakeup enabled, but device_may_wakeup() returns 0 (so that the 
> > > device should be disabled for wakeup when the system goes into 
> > > suspend), then the prepare callback has to return 0.
> > > 
> > > Therefore what you need to do here is something like this:
> > > 
> > >         struct usb_device       *udev = to_usb_device(dev);
> > > 
> > >         /* Return 0 if the current wakeup setting is wrong, otherwise
> > > 1 */
> > 
> > And the other way round?
> 
> Your meaning isn't clear.  Are you asking what should happen if the 
> device is in runtime suspend with remote wakeup disabled, but 
> device_may_wakeup() returns 1?

Yes. I was thinking about that case.

>   That case should never happen -- but 
> if it does then the prepare callback should return 0.

Exactly. It didn't seem to do so.

	Regards
		Oliver


	

  reply	other threads:[~2015-04-01 14:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-31 16:14 [PATCH 0/6] Allow UVC devices to remain runtime-suspended when sleeping Tomeu Vizoso
2015-03-31 16:14 ` [PATCH 1/6] [media] uvcvideo: Enable runtime PM of descendant devices Tomeu Vizoso
2015-03-31 16:14 ` [PATCH 2/6] [media] v4l2-core: Implement dev_pm_ops.prepare() Tomeu Vizoso
2015-03-31 16:14 ` [PATCH 3/6] Input: " Tomeu Vizoso
2015-03-31 16:14 ` [PATCH 4/6] [media] media-devnode: Implement dev_pm_ops.prepare callback Tomeu Vizoso
2015-03-31 16:14 ` [PATCH 5/6] Input: evdev - Enable runtime PM of the evdev input handler Tomeu Vizoso
2015-03-31 20:31   ` Dmitry Torokhov
2015-04-03 13:03     ` Tomeu Vizoso
     [not found] ` <1427818501-10201-1-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2015-03-31 16:14   ` [PATCH 6/6] USB / PM: Allow USB devices to remain runtime-suspended when sleeping Tomeu Vizoso
2015-03-31 16:14     ` Tomeu Vizoso
2015-03-31 17:09     ` Alan Stern
2015-04-01 12:40       ` Oliver Neukum
2015-04-01 14:01         ` Alan Stern
2015-04-01 14:26           ` Oliver Neukum [this message]
2015-04-01 14:36             ` Alan Stern
2015-04-03 13:05       ` Tomeu Vizoso

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=1427898406.30440.12.camel@suse.de \
    --to=oneukum@suse.de \
    --cc=bigeasy@linutronix.de \
    --cc=dan.j.williams@intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jwerner@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=lkml14@scotdoyle.com \
    --cc=pratyush.anand@st.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=stern@rowland.harvard.edu \
    --cc=tomeu.vizoso@collabora.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.