Usb gadget serial connection status

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

 



Hi folks,
This is a simple question, but I didn't find any solution on the web
(nor in this group).
I'm using linux 2.6.30 on a Samsung S3C2410 ARM9. I use a monolitic
kernel, with USB serial gadget driver.
Normally I test it connecting it to a Windows XP USB host port, and I
send datas using Hyperterminal (I hate this, but it's what my
customers request).
My user program uses /dev/ttyGS0, and all works OK (open, read, write,
close, poll).
My problem is: how can the user program be notified about plugging /
unplugging the USB cable ?
When the cable get unplugged, poll() receives POLLHUP|POLLERR signal
forever, how can I acknowledge it ? Should I close(), and wait for
reopening ? Or simply mask it ?
What should the program wait for to be notified for USB cable
insertion ? I would like to sleep and wait for something without
wasting precious CPU time.
Thank you
Davide Rizzo
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux