LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 01-02-2019, 03:10 PM   #1
ranshalit
LQ Newbie
 
Registered: Apr 2011
Posts: 10

Rep: Reputation: 0
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

Last edited by ranshalit; 01-03-2019 at 12:09 AM.
 
Old 01-13-2019, 01:58 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I think you should be able to do both.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vpn poptop - CTRL: PTY read or GRE write failed (pty,gre)=(5,6) dezeque Linux - Networking 9 08-26-2016 10:39 AM
Simulate serial device with pty's maus Linux - Software 4 09-27-2009 11:10 AM
Ignoring MODEM control commands on pty driver. mrsq Linux - Newbie 0 09-02-2009 11:51 PM
Userspace handling of driver interrupts AustinMarton Linux - Kernel 12 01-14-2009 08:48 PM
Help with converting a userspace PCI program to a Device Driver cstrask Linux - Hardware 0 10-31-2005 09:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration