dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

77 Commits

Author SHA1 Message Date
Luis Llorente Campo 8de7f4da8f USB: add OWL CM-160 support to cp210x driver
This adds support for the OWL CM-160 electricity monitor to the cp210x
driver.

Signed-off-by: Luis Llorente <luisllorente@luisllorente.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 13:51:12 +01:00
Markus Becker 356fe44f4b USB: cp210x: add Virtenio Preon32 device id
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Markus Becker <mab@comnets.uni-bremen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-26 14:57:20 -08:00
Johan Hovold bcbec053d2 USB: serial: remove driver version information
Remove all MODULE_VERSION macros and driver-version information (except
for garmin_gps which uses it in a status reply).

It is the kernel version that matters and not some private version
scheme which rarely even gets updated.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-31 12:48:06 -07:00
Johan Hovold 4f2ab88874 USB: cp210x: fix whitespace issues
Fix missing and superfluous whitespace.
Fix misplaced brackets.
Fix indentation.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-30 13:06:08 -07:00
Johan Hovold 4295fe7791 USB: cp210x: fix port-data memory leak
Fix port data memory leak by replacing port private data with serial
private data.

Since commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) the port private data is no longer freed at
release.

The private data is used to store the control interface number, but as
this is the same for all ports on an interface it should be stored as
usb-serial data anyway.

Cc: <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-16 10:25:54 -07:00
Linus Torvalds d9a807461f USB merge for 3.7-rc1
Here is the big USB pull request for 3.7-rc1
 
 There are lots of gadget driver changes (including copying a bunch of
 files into the drivers/staging/ccg/ directory so that the other gadget
 drivers can be fixed up properly without breaking that driver), and we
 remove the old obsolete ub.c driver from the tree.  There are also the
 usual XHCI set of updates, and other various driver changes and updates.
 We also are trying hard to remove the old dbg() macro, but the final
 bits of that removal will be coming in through the networking tree
 before we can delete it for good.
 
 All of these patches have been in the linux-next tree.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iEYEABECAAYFAlBp3+AACgkQMUfUDdst+ym5vwCfe93FyJyXn/RDkGz7iBemvWFd
 vrwAoIxjaOa4/yWZWcgrWc5bP4aO3ssc
 =jYDr
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB changes from Greg Kroah-Hartman:
 "Here is the big USB pull request for 3.7-rc1

  There are lots of gadget driver changes (including copying a bunch of
  files into the drivers/staging/ccg/ directory so that the other gadget
  drivers can be fixed up properly without breaking that driver), and we
  remove the old obsolete ub.c driver from the tree.

  There are also the usual XHCI set of updates, and other various driver
  changes and updates.  We also are trying hard to remove the old dbg()
  macro, but the final bits of that removal will be coming in through
  the networking tree before we can delete it for good.

  All of these patches have been in the linux-next tree.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

Fix up several annoying - but fairly mindless - conflicts due to the
termios structure having moved into the tty device, and often clashing
with dbg -> dev_dbg conversion.

* tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits)
  USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc
  USB: uas: fix gcc warning
  USB: uas: fix locking
  USB: Fix race condition when removing host controllers
  USB: uas: add locking
  USB: uas: fix abort
  USB: uas: remove aborted field, replace with status bit.
  USB: uas: fix task management
  USB: uas: keep track of command urbs
  xhci: Intel Panther Point BEI quirk.
  powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY
  USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
  Revert "usb : Add sysfs files to control port power."
  USB: serial: remove vizzini driver
  usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems
  Increase XHCI suspend timeout to 16ms
  USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq
  USB: sierra_ms: don't keep unused variable
  fsl/usb: Add support for USB controller version 2.4
  USB: qcaux: add Pantech vendor class match
  ...
2012-10-01 13:23:01 -07:00
Greg Kroah-Hartman 19e988cfb9 USB: serial: cp210x.c: remove debug module parameter
Now that the dbg() macro is no longer being used in the driver,
the debug module parameter doesn't do anything at all.  So remove
it so as to not confuse people.

CC: Johan Hovold <jhovold@gmail.com>
CC: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-14 12:31:21 -07:00
Greg Kroah-Hartman 660f3b1410 USB: serial: cp210x.c: remove dbg() usage
dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.

CC: Johan Hovold <jhovold@gmail.com>
CC: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 17:18:13 -07:00
Wei Yongjun 89bb957ec8 USB: cp210x: remove useless set memory to zero use memset()
The memory return by kzalloc() or kmem_cache_zalloc() has already
be set to zero, so remove useless memset(0).

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 16:58:30 -07:00
Alan Cox adc8d746ca tty: move the termios object into the tty
This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special case

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 13:00:41 -07:00
Craig Shelley 3fcc8f9682 USB: CP210x Add 10 Device IDs
This patch adds 10 device IDs for CP210x based devices from the following manufacturers:
Timewave
Clipsal
Festo
Link Instruments

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 16:14:34 -07:00
Mikko Tuumanen 5bbfa6f427 USB: serial: cp210x: add Optris MS Pro usb id
Signed-off-by: Mikko Tuumanen <mikko.tuumanen@qemsoftware.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-12 16:05:59 -07:00
Greg Kroah-Hartman 68e2411345 USB: serial: rework usb_serial_register/deregister_drivers()
This reworks the usb_serial_register_drivers() and
usb_serial_deregister_drivers() to not need a pointer to a struct
usb_driver anymore.  The usb_driver structure is now created dynamically
and registered and unregistered as needed.

This saves lines of code in each usb-serial driver.  All in-kernel users
of these functions were also fixed up at this time.  The pl2303 driver
was tested that everything worked properly.

Thanks for the idea to do this from Alan Stern.

Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Support Department <support@connecttech.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-08 15:46:14 -07:00
Greg Kroah-Hartman 32078f915d USB: serial: remove usb_serial_disconnect call in all drivers
This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 14:02:13 -07:00
Greg Kroah-Hartman 5026bb07be USB: serial: remove usb_serial_probe call in all drivers
This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-07 13:48:33 -07:00
Greg Kroah-Hartman b978a5a11b USB: cp210x.c: remove dbg() tracing calls
dbg() was used a lot a long time ago to trace code flow.  Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Johan Hovold <jhovold@gmail.com>
CC: Preston Fick <preston.fick@silabs.com>
CC: Yuri Matylitski <ym@tekinsoft.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-03 16:43:57 -07:00
Preston Fick 32445605fc usb: cp210x: Corrected USB request type definitions
The original request types in the cp210x driver are labled as "DEVICE_TO_HOST" and
"HOST_TO_DEVICE" but the actual bit definition corresponds to a request to the
interface. This has been corrected, and the actual definition for the device
requests have been added.

Signed-off-by: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-02 13:42:43 -07:00
Yuri Matylitski 2d5733fcd3 USB: serial: cp210x: Fixed usb_control_msg timeout values
Fixed too small hardcoded timeout values for usb_control_msg
in driver for SiliconLabs cp210x-based usb-to-serial adapters.
Replaced with USB_CTRL_GET_TIMEOUT/USB_CTRL_SET_TIMEOUT.

Signed-off-by: Yuri Matylitski <ym@tekinsoft.com>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-20 08:44:24 -07:00
Preston Fick a5360a53a7 usb: cp210x: Update to support CP2105 and multiple interface devices
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>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-03-02 16:19:16 -08:00
Greg Kroah-Hartman 274f3b1e82 USB: serial: cp210x.c: use module_usb_serial_driver
This converts the cp210x.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: "Malte Schröder" <maltesch@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-28 13:11:40 -08:00
Alan Stern 08a4f6bc2e usb-serial: use new registration API in [a-c]* drivers
This patch (as1523) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:

	aircable, ark3116, belkin_sa, ch341, cp210x, cyberjack,
	and cypress_m8.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-24 12:39:17 -08:00
Greg Kroah-Hartman c69263c66e Merge branch 'usb-3.3-rc4' into usb-next
This is to pull in the xhci changes and the other fixes and device id
updates that were done in Linus's tree.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-23 08:21:03 -08:00
Bruno Thomsen c6c1e4491d USB: Added Kamstrup VID/PIDs to cp210x serial driver.
Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-21 16:29:15 -08:00
Greg Kroah-Hartman 7483948fdd Merge tag 'usb-3.3-rc3' into usb-next
This is done to resolve a merge conflict with:
	drivers/usb/class/cdc-wdm.c
and to better handle future patches for this driver as it is under
active development at the moment.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-10 11:13:53 -08:00
Johan Hovold 0b238583ac USB: cp210x: fix debug output
Remove superfluous newlines from debug statements.
Remove unnecessary line breaks.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 14:31:04 -08:00
Johan Hovold d1620ca9e7 USB: cp210x: allow more baud rates above 1Mbaud
Allow more baud rates to be set in [1M,2M] baud.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:58:46 -08:00
Johan Hovold cdc32fd6f7 USB: cp210x: initialise baud rate at open
The newer cp2104 devices require the baud rate to be initialised after
power on. Make sure it is set when port is opened.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:58:46 -08:00
Johan Hovold e5990874e5 USB: cp210x: clean up, refactor and document speed handling
Clean up and refactor speed handling.
Document baud rate handling for CP210{1,2,4,5,10}.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:57:53 -08:00
Johan Hovold be125d9c8d USB: cp210x: do not map baud rates to B0
We do not implement B0 hangup yet so map low baudrates to 300bps.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:52:13 -08:00
Johan Hovold 34b76fcaee USB: cp210x: fix up set_termios variables
[Based on a patch from Johan, mangled by gregkh to keep things in line]

Fix up the variable usage in the set_termios call.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:49:43 -08:00
Preston Fick 7f482fc88a USB: cp210x: fix CP2104 baudrate usage
This fix changes the way baudrates are set on the CP210x devices from
Silicon Labs. The CP2101/2/3 will respond to both a GET/SET_BAUDDIV
command, and GET/SET_BAUDRATE command, while CP2104 and higher devices
only respond to GET/SET_BAUDRATE. The current cp210x.ko driver in
kernel version 3.2.0 only implements the GET/SET_BAUDDIV command.

This patch implements the two new codes for the GET/SET_BAUDRATE
commands. Then there is a change in the way that the baudrate is
assigned or retrieved. This is done according to the CP210x USB
specification in AN571. This document can be found here:
http://www.silabs.com/pages/DownloadDoc.aspx?FILEURL=Support%20Documents/TechnicalDocs/AN571.pdf&src=DocumentationWebPart

Sections 5.3/5.4 describe the USB packets for the old baudrate method.
Sections 5.5/5.6 describe the USB packets for the new method. This
patch also implements the new request scheme, and eliminates the
unnecessary baudrate calculations since it uses the "actual baudrate"
method.

This patch solves the problem reported for the CP2104 in bug 42586,
and also keeps support for all other devices (CP2101/2/3).

This patchfile is also attached to the bug report on
bugzilla.kernel.org. This patch has been developed and test on the
3.2.0 mainline kernel version under Ubuntu 10.11.

Signed-off-by: Preston Fick <preston.fick@silabs.com>
[duplicate patch also sent by Johan - gregkh]
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:45:10 -08:00
Johan Hovold 55b2afbb92 USB: cp210x: call generic open last in open
Make sure port is fully initialised before calling generic open.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:37:53 -08:00
Renato Caldas 791b7d7cf6 USB: serial: CP210x: Added USB-ID for the Link Instruments MSO-19
This device is a Oscilloscope/Logic Analizer/Pattern Generator/TDR,
using a Silabs CP2103 USB to UART Bridge.

Signed-off-by: Renato Caldas <rmsc@fe.up.pt>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-24 11:37:52 -08:00
Rusty Russell 90ab5ee941 module_param: make bool parameters really bool (drivers & misc)
module_param(bool) used to counter-intuitively take an int.  In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option.  For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-01-13 09:32:20 +10:30
Malte Schröder 08e87d0d77 USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c
Hi, below patch adds the USB-ID of the serial adapters sold by
Multiplex RC (www.multiplex-rc.de).

Signed-off-by: Malte Schröder <maltesch@gmx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-05 12:10:52 -08:00
Johan Hovold 2479e2a9c0 USB: cp210x: forward USB errors to USB serial core
Make sure we forward all error codes (e.g. ENOMEM) to USB serial core.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-15 10:47:42 -08:00
Roland Koebler 4b6181caa4 USB: serial: cp210x.c: add mark/space parity
Add mark and space parity support.

Signed-off-by: Roland Koebler <r.koebler@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-14 16:46:06 -08:00
Florian Fainelli c851e83f00 USB: cp210x: fix typo, Telegesys should have been Telegesis
CC: David Chalmers <david.chalmers@telegesis.com>
Reported-by: Xavier Carcelle <xavier.carcelle@gmail.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-10 14:14:58 -07:00
Craig Shelley 4eff0b40a7 USB: CP210x Add 4 Device IDs for AC-Services Devices
This patch adds 4 device IDs for CP2102 based devices manufactured by
AC-Services. See http://www.ac-services.eu for further info.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-29 16:45:20 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Alan Cox 20b9d17715 tiocmset: kill the file pointer argument
Doing tiocmget was such fun we should do tiocmset as well for the same
reasons

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-17 11:52:43 -08:00
Alan Cox 60b33c133c tiocmget: kill off the passing of the struct file
We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-17 11:47:33 -08:00
Libor Pechacek d14fc1a74e USB: serial: handle Data Carrier Detect changes
Alan's commit 335f8514f2 introduced
.carrier_raised function in several drivers.  That also means
tty_port_block_til_ready can now suspend the process trying to open the serial
port when Carrier Detect is low and put it into tty_port.open_wait queue.  We
need to wake up the process when Carrier Detect goes high and trigger TTY
hangup when CD goes low.

Some of the devices do not report modem status line changes, or at least we
don't understand the status message, so for those we remove .carrier_raised
again.

Signed-off-by: Libor Pechacek <lpechacek@suse.cz>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-22 18:53:26 -08:00
Craig Shelley 9926c0df7b USB: CP210x Removed incorrect device ID
Device ID removed 0x10C4/0x8149 for West Mountain Radio Computerized
Battery Analyzer.  This device is actually based on a SiLabs C8051Fxxx,
see http://www.etheus.net/SiUSBXp_Linux_Driver for further info.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-22 18:32:16 -08:00
Craig Shelley faea63f7cc USB: CP210x Add two device IDs
Device Ids added for IRZ Automation Teleport SG-10 GSM/GPRS Modem and
DekTec DTA Plus VHF/UHF Booster/Attenuator.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-22 18:32:16 -08:00
Anders Larsen 93ad03d60b USB: cp210x: Add WAGO 750-923 Service Cable device ID
The WAGO 750-923 USB Service Cable is used for configuration and firmware
updates of several industrial automation products from WAGO Kontakttechnik GmbH.

Bus 004 Device 002: ID 1be3:07a6
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x1be3
  idProduct          0x07a6
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 WAGO USB Service Cable
  iSerial                 3 1277796751
  . . .

Signed-off-by: Anders Larsen <al@alarsen.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:22:06 -07:00
DJ Delorie 2f1136d1d0 USB: cp210x: Add Renesas RX-Stick device ID
RX610 development board by Renesas

Bus 001 Device 024: ID 045b:0053 Hitachi, Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x045b Hitachi, Ltd
  idProduct          0x0053
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 RX-Stick
  iSerial                 3 0001
  . . .

http://am.renesas.com/rx610stick

Signed-off-by: DJ Delorie <dj@delorie.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-22 10:21:43 -07:00
A E Lawrence 5b22a32e76 USB: cp210x usb driver: add USB_DEVICE for Pirelli DP-L10 mobile.
The Pirelli DP-L10 mobile is sold under various brand names. One, already
supported by cp210x, is the T-COM TC300. Here is the lsusb for that version:
-------------------------------------------------------------------
Bus 001 Device 002: ID 0489:e000 Foxconn / Hon Hai T-Com TC 300
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0489 Foxconn / Hon Hai
  idProduct          0xe000 T-Com TC 300
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 TC 300
  iSerial                 3 0001
    [snip]
---------------------------------------------------------------------------

However the native Pirelli DP-L10 is not supported:
------------------------------------------------------------------
Bus 001 Device 003: ID 0489:e003 Foxconn / Hon Hai Pirelli DP-L10
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x0489 Foxconn / Hon Hai
  idProduct          0xe003 Pirelli DP-L10
  bcdDevice            1.00
  iManufacturer           1 Silicon Labs
  iProduct                2 DP-L10
  iSerial                 3 0001
    [snip]
-------------------------------------------------------------------------

All that is required is an extra USB_DEVICE entry:

{ USB_DEVICE(0x0489, 0xE003) }, /* Pirelli Broadband S.p.A, DP-L10 SIP/GSM
+Mobile */

The patch adds that entry. Tested under 2.6.36-rc2 from git.

Signed-off-by: A E Lawrence <lawrence_a_e@ntlworld.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-03 17:33:40 -07:00
Jason Detring 0bf7a81c5d USB: cp210x: Add B&G H3000 link cable ID
This is the cable between an H3000 navigation unit and a multi-function display.
http://www.bandg.com/en/Products/H3000/Spares-and-Accessories/Cables/H3000-CPU-USB-Cable-Pack/

Signed-off-by: Jason Detring <jason.detring@navico.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-03 17:33:40 -07:00
Craig Shelley 541e05ec3a USB: CP210x Add new device ID
New device ID added for Balluff RFID reader.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-03 17:33:40 -07:00