public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Mockern@yandex.ru
Cc: linux-kernel@vger.kernel.org
Subject: Re: Linux tty driver question
Date: Sat, 17 Feb 2007 12:01:40 +0100	[thread overview]
Message-ID: <45D6E094.8030006@gmail.com> (raw)
In-Reply-To: <45D6D3A3.000001.04520@tide.yandex.ru>

Mockern napsal(a):
> Hi,
> 
> I'm working on Linux tty driver (based on tiny_tty).
> 
> How can I provide in my driver Linux cat operation (e.g.cat < ttyS3)?

call tty_insert_flip_*() from somewhere to put some data into tty recieve 
buffer, which is pushed into ldisc by tty_flip_buffer_push() and then sent by 
tty_read function (where ldisc read is called) to userspace for reading process.

> What should I implement exactly?

open, settermios, write_room (note that this is minimal and will probably oops 
when poll or write is invoked) + some isr or timer to fill the buffer mentioned 
above.

regards,
-- 
http://www.fi.muni.cz/~xslaby/            Jiri Slaby
faculty of informatics, masaryk university, brno, cz
e-mail: jirislaby gmail com, gpg pubkey fingerprint:
B674 9967 0407 CE62 ACC8  22A0 32CC 55C3 39D4 7A7E

Hnus <hnus@fi.muni.cz> is an alias for /dev/null

  reply	other threads:[~2007-02-17 11:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-17 10:06 Linux tty driver question Mockern
2007-02-17 11:01 ` Jiri Slaby [this message]
2007-02-17 11:27   ` Mockern
2007-02-17 12:55     ` Jiri Slaby
2007-02-17 13:05       ` Mockern
2007-02-27  9:46     ` Jiri Slaby

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45D6E094.8030006@gmail.com \
    --to=jirislaby@gmail.com \
    --cc=Mockern@yandex.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox