LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   serial userspace driver using pty ? (https://www.linuxquestions.org/questions/linux-kernel-70/serial-userspace-driver-using-pty-4175645390/)

ranshalit 01-02-2019 03:10 PM

serial userspace driver using pty ?
 
Hello,

I have the following challenge:

We have fpga connected to pci. Behind the fpga we have: serial, canbus, and other devices (i2c, and more).

We need that the serial shall be a regular device in /dev/ttyX , the other devices can have their own API.

I thought about the following two alternatives:

1. Write pci-tty drivers in kernel (which will be shown as /dev/ttyX ), and write the rest of the drivers in userspace (everything is memory mapped, and the canbus driver in userspace can be informed about interrupts from kernel.

2. Write everything in userspace using uio_pci_generic in kernel, and use pty (pseudo terminal) to make the serial also to be treated as regular terminal device .


Does the two alternatives make sense (I haven't find any example of pty serial driver, so I have doubts if the pty should work ?).
What do you think about the alternatives ?

Thank you,
ran

Mara 01-13-2019 01:58 PM

I think you should be able to do both.


All times are GMT -5. The time now is 07:51 AM.