Device type and revision is now determined from the bcdDevice field and
doesn't need to be in the table at all. The feature that skips creation
of /dev/ttyU* entries for jtag and gpio interfaces is enhanced:
- The feature is now optional, but enabled by default. A tunable and
sysctl are available to control it: hw.usb.uftdi.skip_jtag_interfaces.
- We no longer assume interface #0 is the only jtag interface. Up to
eight interfaces per chip can be flagged as jtag. (Current ftdi chips
support a max of 4 interfaces; this leaves room for growth.)
- Some manufacturers don't change the product ID or use the same ID for
different devices intended for both serial-comms and jtag/gpio use.
Often while the product ID is the same, the product name string is
different, so it's now possible to search for the product name in a
table of strings and get the set of non-tty interfaces from that table.
other modes supported by the FTDI serial adapter chips.
In addition to adding the new ioctls, this change removes all the code
that reset the chip at attach and open/close time, and also the code
that turned on RTS/CTS flow control on open without any permission to do
so (that was just always a bug in the driver).
When FTDI chips are configured as GPIO or MPSSE or other special-purpose
uses by an attached serial eeprom, the chip will power on with certain
pins driven or floating, and it's important that the driver not do
anything to the chip to perturb that unless it receives a specific
command to do so. When used for "plain old serial comms" the chip
powers on into the right mode and never needs to be reset while it's
running to operate properly, so this change is transparent to most users.
Recent FDTI chips have the ability to operate at up to 12mbps. The newer
chips with faster clocks have the same usb vendor/product IDs as the older
chips; the bcdDevice field must be used to detect the newer versions. This
change includes a new function to do that instead of using just the IDs from
the vendor/product table.
The code to choose the baud clock divisor is completely rewritten. In
addition to supporting the new higher clock rates, the rewrite fixes a
longstanding bug in the old code which put the high bits of the fractional
part of the divisor into the wrong place in the wIndex field. That bug
was mostly harmless -- it accidentally didn't affect standard baud rates
and would only show up when using relatively fast non-standard rates.
that the wrong UART reference clock will be used for a few of the IDs.
It is currently not possible to figure that out because the Linux FTDI
driver detects this run-time and not compile time based on the bcdDevice
field of the USB device descriptor. Some of the ID's in usbdevs are not
sorted according to the product ID value. Please feel free to fix this.
I'm out of my xemacs magic today.
This syncronises us with the linux kernel at kernel.org (HEAD).
MFC after: 2 weeks
This includes adding support for skipping FTDI interfaces used for JTAG
leaving them for userland and just attaching to the RS232 half, similarly
to how the corresponding Linux drivers handles these kind of adapters.
While at it, sort uftdi_devs and return BUS_PROBE_SPECIFIC (because
uftdi_probe() alters the instance variables for better or worse as do
other probe routines of USB drivers) instead of 0.
- Remove duplicated entries for BeagleBone.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Remove some stray lines.
MFC after: 3 days