USB conversion to the runtime PM framework

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

 



Oliver:

There are a couple of significant differences between the existing USB 
runtime PM code and the new framework.

The first has to do with intf->pm_usage_cnt.  In the framework each
struct device already has its own PM usage counter, so keeping our own
would be redundant.  On the other hand, without it we have to depend on
drivers to make sure that they correctly balance autopm_get and
autopm_put calls (they won't be able to change the usage counter
directly).  In particular, their total usage change from binding to
unbinding must be exactly zero.  I'm not sure the existing code in the
drivers does this.

The second has to do with the power/level attribute.  Currently the
framework doesn't define any runtime PM attributes, but it may well add
its own level attribute eventually.  When it does, there won't be
anything corresponding to level = off.  Should we start phasing this
feature out now?  (This is one reason for adding the "safely remove
hardware" API; at the moment suspending a port is the closest
userspace can come to disabling it.)

Here's a third matter (not directly related to the new framework but
connected with runtime PM): Should we add rudimentary autosuspend
support back into usb-storage?  By default it will remain disabled, of
course.  But there are many cases where it could be very helpful to
users -- think of low-power systems with USB flash drives.  Such users
could enable it manually.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux