]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
usb: cp210x: Update to support CP2105 and multiple interface devices
authorPreston Fick <preston.fick@silabs.com>
Fri, 24 Feb 2012 19:42:39 +0000 (13:42 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:27:08 +0000 (09:27 -0700)
commit765d0ce6508f7c7aef9a0c26c5120cd87bb7ba0a
tree9cd39498d12a8c1150c0c645604f80260bf42afe
parent2e9bffdca0695e4176428c54c2668d70e6f3b425
usb: cp210x: Update to support CP2105 and multiple interface devices

commit a5360a53a7ccad5ed9ccef210b94fef13c6e5529 upstream.

This patch updates the cp210x driver to support CP210x multiple
interface devices devices from Silicon Labs. The existing driver
always sends control requests to interface 0, which is hardcoded in
the usb_control_msg function calls. This only allows for single
interface devices to be used, and causes a bug when using ports on an
interface other than 0 in the multiple interface devices.

Here are the changes included in this patch:
- Updated the device list to contain the Silicon Labs factory default
  VID/PID for multiple interface CP210x devices
- Created a cp210x_port_private struct created for each port on
  startup, this struct holds the interface number
- Added a cp210x_release function to clean up the cp210x_port_private
  memory created on startup
- Modified usb_get_config and usb_set_config to get a pointer to the
  cp210x_port_private struct, and use the interface number there in the
  usb_control_message wIndex param

Signed-off-by: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/cp210x.c