Ming Lei 1ded7ea47b USB: ch341 serial: fix port number changed after resume
This patch fixes the following bug:
	.plug ch341 usb serial port into a hub port;
	.ch341 driver bound to the device and /dev/ttyUSB0 comes
	.open /dev/ttyUSB0 by minicom and we can use the serial successfully
	.suspend the ch341 usb serial device(such as: echo suspend > power/level)
	.resume the ch341 usb serial device (such as: echo on > power/level)
	.new port /dev/ttyUSB1 comes ,and the original /dev/ttyUSB0 still exists,
but is no longer usable by minicom

The patch adds suspend and resume callback to ch341 usb driver to prevent it
from unbinding during suspend. The /dev/ttyUSB0 is not released until being
closed, so /dev/ttyUSB1 comes after resume, and the original /dev/ttyUSB0 is
no longer usable by minicom. It is really a mess for a minicom user.

This patch also adds the reset_resume callback to make it usable after resuming
from STR or hibernation, for generally STR or hibernation will make the vbus
of root-hub lost.

Finally enable the driver's supports_autosuspend, for the device is in working
order with it.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:36 -07:00
..
2008-07-22 13:03:22 -07:00
2008-07-22 13:03:22 -07:00
2008-07-22 13:03:22 -07:00
2009-03-17 14:01:28 -07:00
2008-07-22 13:03:23 -07:00
2008-07-22 13:03:23 -07:00
2008-07-22 13:03:27 -07:00
2008-02-01 14:34:47 -08:00
2008-07-22 13:03:22 -07:00
2008-10-13 09:51:41 -07:00
2008-10-13 09:51:41 -07:00
2009-01-02 10:19:36 -08:00
2007-08-22 14:27:43 -07:00
2008-07-22 13:03:22 -07:00