<div dir="ltr"><div dir="ltr"><p>Hi,</p>
<p>I want to develop a serial driver in Linux which is somehow like PRU 
software uart (suart Linux driver) for am335x to represent a virtual TTY
 device under /dev...</p>
<p>Inspecting the pru_suart.c code in TI Linux SDK, I developed a simple serial driver...</p>
<p>The attached code (amfdDriver.c) emulate Rx interrupt by a timer and 
upon its trigger, It adds a character to Rx FIFO as if a new character 
received...</p>
<p>Testing the code on my PC (ubuntu 16.04 with kernel 4.15.0-106-generic), I don't get the correct output.</p>
<p><span style="background-color:rgb(255,255,255);color:rgb(51,153,102)"><strong>What I expect:</strong> </span>is
 that if I run "$sudo cat /dev/ttyAMFD0", I should see the "t" character
 every second added to receive FIFO by timer, i.e. printing "t" every 
second on terminal .... <strong>But that is not the case ...</strong></p>
<p><span style="color:rgb(255,0,0)"><strong>What happens:</strong></span> is that before running <strong>"$sudo cat /dev/ttyAMFD0"</strong>, the timer just printk the statement in it, and after I run <strong>"$sudo cat /dev/ttyAMFD0"</strong> It calls <strong>start_tx</strong> without printing anything on terminal (dmesg output is in attachment)... as I tested, <strong>start_tx</strong> is called because of calling <strong>tty_flip_buffer_push </strong>in code after inserting the character<br></p><p>I tried many things but none of them works... What could be the problem?</p>
<p>Thanks in advance</p></div></div>