Re: pty for real device ?

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

 



On Fri, Jan 4, 2019 at 9:57 AM Greg KH <greg@xxxxxxxxx> wrote:
>
> 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.
>
The FPGA has several devices mapped to pci with one vector table for
all these fpga devices.
Is a platform driver should be used to connect tha uart and the
canbus, each to its pci driver or is it best to write one single pci
driver for all these devices and register each device (uart, canbus)
seperately in the custom pci driver?

Thanks

> good luck!
>
> greg k-h



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux