How to determine whether a USB drive is idle?

390 Views Asked by At

I'm working on a way to automatically suspend a USB drive for power saving when the device is idle. Since I'm working with an old kernel, it doesn't support autosuspend; but I can manually unbind the device and achieve the low power state.

However, I'm not sure how to detect whether the USB device is actually idle before I unbind it.

I've read this post, and I'm wondering whether that's a valid way to do it.

I also need to know when the kernel / driver wants to access the device again so that I can re-bind it, so the above way may not be quite what I'm looking for.

Do folks have any other suggestions for this?

Cheers, R

0

There are 0 best solutions below