Wake usb-serial device and disable autosuspend after probing

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

 



Hello,

It was observed that the GPIOs of the ftdi_sio driver cannot be used
when the device was put into autosuspend earlier (usb_control_msg returns
-EHOSTUNREACH). Quick workaround for users is to disable autosuspend only
for this affected device, which reportedly fixes the problem.
However, as the original contributor of this GPIO functionality, my goal
is creating patch that automatically wakes the device and disables auto-
suspend when (and only when) the user requests a GPIO line, thereby making
sure that the GPIOs will be usable (which the user has already declared
a demand for by requesting a line).

Unfortunately, nothing I try in the kernel works. usb_autopm_get_interface()
is called successfully (returns 0), but the device still goes into suspend
(or does not wake if already suspended, dunno). I also tried
usb_disable_autosuspend() but same results.

So my question is: how can I wake a suspended usb-serial device and
prevent it from going into autosuspend again (after probing ended)?
AFAICT usb_autopm_get_interface() should do exactly this, but as I said
above, for some reason it doesn't have the expected effect.

Thank you for your help,
Karoly




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

  Powered by Linux