LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.

Notices


Reply
  Search this Thread
Old 05-14-2013, 04:21 AM   #1
tangenty
LQ Newbie
 
Registered: Apr 2013
Posts: 3

Rep: Reputation: Disabled
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
 
Old 08-07-2013, 02:33 AM   #2
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Maybe this?: http://www.mjmwired.net/kernel/Docum...sb/persist.txt
 
Old 08-07-2013, 02:35 AM   #3
rootboy
Member
 
Registered: Oct 2001
Distribution: Mint 15
Posts: 770

Rep: Reputation: 51
Or here: http://stackoverflow.com/questions/7...-ttyusb-number
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Automatically Resume from Suspend to Ram and Suspend to Disk to Save Battery in Linux LXer Syndicated Linux News 0 05-10-2013 02:40 AM
[SOLVED] Why do nVida drivers hose suspend/resume or hibernate/resume? taylorkh Linux - Hardware 3 06-23-2011 01:09 PM
usbserial enumeration issue after suspend zxz Linux - Kernel 0 01-25-2010 04:23 PM
can't resume after suspend newbiesforever Linux - General 1 08-26-2009 06:52 AM
Issue when resume from suspend in Slack 12.1 lordwolf Slackware 8 12-03-2008 07:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 12:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration