public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Oliver Neukum <oliver@neukum.org>
To: Marcel Holtmann <marcel@holtmann.org>
Cc: Pavel Machek <pavel@suse.cz>, Stefan Seyfried <seife@suse.de>,
	linux-bluetooth@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Re: [rfc/rft]power management for btusb
Date: Wed, 20 Aug 2008 14:42:07 +0200	[thread overview]
Message-ID: <200808201442.08208.oliver@neukum.org> (raw)
In-Reply-To: <1219235683.7591.326.camel@violet.holtmann.net>

Am Mittwoch 20 August 2008 14:34:43 schrieb Marcel Holtmann:
> Hi Oliver,
> 
> > > What are the semantics for usb_autopm_{get,put}_interface? Can we expect
> > > to always get a suspend() and resume() callback?
> > 
> > usb_autopm_get_interface() guarantees that after it returns successsfully
> > the interface (and teh device with it) remains unautosuspended until you
> > call usb_autopm_put_interface. The calls stack with a counter.
> > 
> > You'll get a resume() callback only if the device was actually suspended.
> 
> so a device didn't start out suspended? Too bad, otherwise you could cut
> the logic in the driver a lot.

Devices can have multiple interfaces. Therefore this guarantee is impossible.
 
> I tried to run this on my Quad G5, but I never see suspend() or resume()
> called. Do I have to do something to make autosuspend work?

echo "auto" > $(directry in sysfs for device)/power/level
And you'll see power events in syslog only if you compile with
CONFIG_USB_DEBUG

	Regards
		Oliver

  reply	other threads:[~2008-08-20 12:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-20  9:42 [rfc/rft]power management for btusb Oliver Neukum
2008-08-20 10:18 ` Marcel Holtmann
2008-08-20 12:05   ` Oliver Neukum
2008-08-20 12:34     ` Marcel Holtmann
2008-08-20 12:42       ` Oliver Neukum [this message]
2008-08-20 13:00         ` Marcel Holtmann
2008-08-20 13:03           ` Felipe Balbi
2008-08-20 13:05           ` Oliver Neukum
2008-08-20 13:05             ` Marcel Holtmann
2008-08-20 13:11               ` Oliver Neukum
2008-08-20 13:13                 ` Marcel Holtmann
2008-08-20 13:23                   ` Oliver Neukum
2008-08-20 13:24                     ` Marcel Holtmann
2008-08-20 13:34                       ` Oliver Neukum
2008-08-20 13:39                         ` Marcel Holtmann
2008-08-20 14:00                           ` Oliver Neukum
2008-08-20 15:25                             ` Marcel Holtmann
2008-08-20 15:33                               ` Oliver Neukum
2008-08-20 15:35                               ` Alan Stern
2008-08-20 15:41                                 ` Marcel Holtmann
2008-08-20 15:55                                   ` Alan Stern
2008-08-20 16:04                                     ` Oliver Neukum

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=200808201442.08208.oliver@neukum.org \
    --to=oliver@neukum.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=pavel@suse.cz \
    --cc=seife@suse.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox