[PATCH 0/7] USB: cp210x: add cp2104 support

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

 



Hi, 

These patches do some clean up and add support for Silabs cp2104 devices to the
cp210x driver. Most likely cp2105 (and cp2110?) will now work as well.

The cp2104 differs from earlier devices in that it cannot handle the baud div
commands (neither set or get). Instead, one sets the baud rate directly, and
these commands work on the older cp2102 as well. In fact, this is the way that
baud rates are set in Silabs own driver which is supposed to work for legacy
cp2101 devices too.

cp2104 also requires the baud rate to be initialised after power on, as well as
some changes to the speed handling in order to be able to use the new rates
beteen 1 and 2 MBaud.

So, this have been tested on cp2102 and cp2104, but unfortunately I do not have
access to cp2101 or cp2103. Given that this is the way baud rates are set in
Silabs latest driver (which is supposed to work for all their devices) my bet
is that it will work, but I'd really appreciate if someone out there could
verify this (especially cp2101, not so worried about cp2103 which is more
similar to cp2102).

It is possible to keep both mechanisms for setting baud rates if this should
turn out to be necessary. The problem, however, is that these devices all
identify themselves as the same type of device. Parsing the product string
could be an option (as suggested by Andreas, and this is more feasible with
this series as it is most likely only cp2101 that needs to be singled out) and
apparantly cp2101 also uses a different endpoint address which could be used as
an undocumented way of detecting these legacy devices.

Thanks,
Johan

Johan Hovold (7):
  USB: cp210x: fix debug output
  USB: cp210x: call generic open last in open
  USB: cp210x: use direct baud-rate commands
  USB: cp210x: do not map baud rates to B0
  USB: cp210x: clean up, refactor and document speed handling
  USB: cp210x: initialise baud rate at open
  USB: cp210x: allow more baud rates above 1Mbaud

 drivers/usb/serial/cp210x.c |  120 +++++++++++++++++++++++++++++--------------
 1 files changed, 81 insertions(+), 39 deletions(-)

-- 
1.7.8

--
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