> I was thinking about something that looks like serdev from consumer > side, but instead directly works on struct uart_port, w/o actually > allocating a tty (and also the funny things like signals, etc).
uart_port is only a subset of tty devices and also relies upon tty for some of the locking and other behaviour. > > Why do you need to do otherwise ? > > Maybe it could offer better performance ? Unless you have very tight latency requirements I would be surprised if you could do that much better even on a slow machine. If you don't need tty semantics then you can probably beat it hands down by writing your own custom driver for the hardware that doesn't pretend to be a tty in the first place. The cost in the tty stack is pretty much all the Unix tty API and POSIX guarantees. Alan