Re: [PATCH 5/6] Clocklib: Use correct clock for IrDA on pxa

Alan Cox
2008-04-09T20:56:29Z

> > It's called a line discipline, we've had them for many years. We may need
> > a way for ldiscs and drivers to co-operate a bit more but these days we
> > support proper buffering and arbitary baud rates (except on a few
> > platforms whose maintainers are not paying attention ;)).
>
> I feel that's a "it would be nice if" solution - and something worth
> aiming for, but the amount of work required to get there is not going
> to be insignificant.

The work required to fix up the existing FIR hacks is not insignifcant
either. Also right now the tty layer is getting a major rework so now is
actually the time to sort out anything extra that is needed.

If you want 4MBit please just use an ldisc and do

struct ktermios tmp;
mutex_lock(&tty->termios_mutex);
tmp = *tty->termios;
tty_encode_baud_rate(tty, 4000000, 4000000);
tty->driver->set_termios(tty, &tmp);
mutex_unlock(&tty->termios_mutex);

Alan