Re: Linux FTDI driver modifications

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

 



On Tue, Nov 01, 2016 at 12:33:45PM +0100, Meindert Sprang wrote:
> Hello all,
> 
> I am the developer of the ShipModul (CustomWare) MiniPlex products where 
> we use FTDI chips for USB communications.
> I see that even the latest PID we use (FD4B) is already in the 
> ftdi_sio.c driver and I'm glad to see the Linux community picks this up 
> to fast.
> 
> There is one thing however that I'd like to see added to the driver and 
> that is fixed baud rates for our products. Since PID FD49 (the second 
> PID we assigned) we use fixed baudrates, so the user of our products 
> doesn't have to set the right baud rate in his application.
> 
> When browsing through the source code I found here 
> (http://lxr.free-electrons.com/source/drivers/usb/serial/ftdi_sio.c), I 
> found function
> 
> static __u32 get_ftdi_divisor(struct tty_struct *tty, struct 
> usb_serial_port *port)
> 
> where the devisor for a specific baud rate is set.
> 
> In the case at line 1323, where the FT232BM and similar chips are 
> handled, I see an if statement which obviously checks a few PID's to set 
> a fixed baud rate.

That's not exactly what is being done here; rather a nasty one-off hack
is mapping a specific baudrate to a higher non-standard rate for some
PIDs. There is now a standard way of setting such rates (BOTHER),
which should have been used for this.

> So it appears that it would be fairly easy to add a few other exceptions 
> for our PID's. Am I correct?

I'm afraid this is not something I think we should do. Limiting maximum
baudrate etc based on chip types is one thing, but forcing a fixed rate
based on a particular application a chip is used in is something quite
different (e.g. could change after a firmware update).

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