Skip to contentSkip to conversation

need to get the interface cycled with autopm_get/_put() to let a device sleep

DISCUSSION Oliver Neukum 2 participants 2 messages Apr 15, 2015 HID

lore
Share & tools
lore
#0 lore raw

Hi,

I found a problem with the close() function of usbhid. It fails to properly suspend device that don't support remote wake-up. The power core does not retry an autosuspend that failed due to a lack of support for remote wake-up.

So there needs to be a _put() if the need for remote wake-up is rescinded. The current state of affairs leads to joysticks never going to sleep again after use.

But I am not happy with the simple solution. It needlessly wakes up suspended devices. So, I tried using usb_autopm_get_interface_no_resume(). To my considerable surprise that didn't work. I cannot understand why.

So what is to be done?

Regards
Oliver

--
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

#1 lore raw
Quoted 7 lines · Oliver Neukum

Hi,

I found a problem with the close() function of usbhid. It fails to properly suspend device that don't support remote wake-up. The power core does not retry an autosuspend that failed due to a lack of support for remote wake-up.

Quoted 8 lines

So there needs to be a _put() if the need for remote wake-up is rescinded. The current state of affairs leads to joysticks never going to sleep again after use.

But I am not happy with the simple solution. It needlessly wakes up suspended devices. So, I tried using usb_autopm_get_interface_no_resume(). To my considerable surprise that didn't work. I cannot understand why.

In what way did it not work?

Quoted 1 line

So what is to be done?

Start with a little debugging. When you do the put, what happens inside autosuspend_check()?

Alan Stern