On Fri, Jan 04, 2019 at 08:48:25AM +0200, Ranran wrote: > Hello, > > I would like to ask if it make sense to create pty for a serial real device. > > The full story: > I have FPGA behind PCIe with several devices: serial, i2c and others. > I thought of implementing in userspace the device driver using > uio_pci_generic (it's basically memory access and interrupts for > serial). > Now if we need the serial to be like a regular serial in Linux, then I > can use the pty with the serial userspace implementation, and then the > we get pty device node which can be treated just as a regular tty, > Right ? > > Does it make sense to use pty this way with a real device ? If your fpga has a uart on it, why not just use a real kernel driver to control it? It will be much easier in the long-run that way instead of trying to fake it all in userspace. good luck! greg k-h