LinuxQuestions.org
Visit the LQ Articles and Editorials section
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, LiMo, Maemo, MeeGo, Openmoko, Ubuntu Mobile, WebOS, Firefox OS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 06:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration