On Mon, 7 Dec 2015, Felipe Balbi wrote:

> if those are not enabled, then the device doesn't have pm_runtime
> callbacks, see:
> 
> int dpm_sysfs_add(struct device *dev)
> {
>       int rc;
> 
>       rc = sysfs_create_group(&dev->kobj, &pm_attr_group);
>       if (rc)
>               return rc;
> 
>       if (pm_runtime_callbacks_present(dev)) {
>               rc = sysfs_merge_group(&dev->kobj, &pm_runtime_attr_group);
>               if (rc)
>                       goto err_out;
>       }
>       if (device_can_wakeup(dev)) {
>               rc = sysfs_merge_group(&dev->kobj, &pm_wakeup_attr_group);
>               if (rc)
>                       goto err_runtime;
>       }
>       if (dev->power.set_latency_tolerance) {
>               rc = sysfs_merge_group(&dev->kobj,
>                                      &pm_qos_latency_tolerance_attr_group);
>               if (rc)
>                       goto err_wakeup;
>       }
>       return 0;
> 
>  err_wakeup:
>       sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group);
>  err_runtime:
>       sysfs_unmerge_group(&dev->kobj, &pm_runtime_attr_group);
>  err_out:
>       sysfs_remove_group(&dev->kobj, &pm_attr_group);
>       return rc;
> }
> 
> It seems like usbcore always calls pm_runtime_no_callbacks() (which
> makes pm_runtime_callbacks_present() above fail) for all interfaces, but
> I can't seem to find where that's undone. Alan, any hints ?

The USB subsystem treats runtime PM of interfaces differently from 
runtime PM of devices.  Josh should be monitoring the device, not the 
interface.

Alan Stern

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

Reply via email to