Re: [rfc/rft]power management for btusb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux