USBserial suspend/resume issue
Hello,
I have a ttyUSB connection problem in developing Android PAD mobile.
I'm using Android ICS(4.0.4)/Kernel(3.0.31) on TI OMAP4430 and 5 ttyUSB devices are shown when I connect UMTS modem module.
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2
/dev/ttyUSB3
/dev/ttyUSB4
Since this device is not belong to any existing special drivers, by
default, kernel load generic usb-serial driver with the source code
under driver/usb/serial/generic.c. The basic communication works fine
except the suspend/resume feature.
The issue I have is:
If I start a program which open the port of /dev/ttyUSB2 and
/dev/ttyUSB3 and then suspend target system(TI OMAP4430) and resume, I would see
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB4 instead of /dev/ttyUSB2
/dev/ttyUSB5 instead of /dev/ttyUSB3
/dev/ttyUSB6
I didn't close /dev/ttyUSB1 and /dev/ttyUSB2 before the target system suspend and my
goal is NOT to close these ports before suspend and, of course, keep
the port communication work after resume.
I noticed drivers/usb/serial/generic.c doesn't have suspend and resume
function. so I added as below.
static struct usb_driver generic_driver = {
.name = "usbserial_generic",
.probe = generic_probe,
.disconnect = usb_serial_disconnect,
.id_table = generic_serial_ids,
.suspend = usb_serial_suspend, ==> call usb-serial.c's
usb_serial_suspend
.resume = usb_serial_resume, ==> call usb-serial.c's
usb_serial_resume
.no_dynamic_id = 1,
};
But still didn't work.
So can somebody provide me more information about usbserial suspend/resume feature?
1. In the driver/usb/serial/usb-serial.c, are usb_serial_suspend and usb_serial_resume work well for other products?
2. If need to change the driver, what do you suggest to modify for the suspend/resume feature in usb-serial.c, generic.c or even core/driver.c, etc?
3. Is there a way that I can selectively not to suspend the ttyUSBX ports?
Thanks
Yongsoo
|