mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Kurt Häusler" <Kurt@fub-group.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Accessing serial port from kernel module
Date: 23 Jul 2003 15:25:43 +0100	[thread overview]
Message-ID: <1058970342.5520.74.camel@dhcp22.swansea.linux.org.uk> (raw)
In-Reply-To: <8FB92279C69C2944B325B4BD227401790156B8@nt-server.danziger.local>

On Mer, 2003-07-23 at 15:15, Kurt Häusler wrote:
> What is the preferred way in Linux for my module to open the serial port device such as /dev/ttyS1.

Make your driver a line discipline is the normal approach in this case
(ok to be fair putting it all in user space is the normal case). Take a
look at slip.c to see how slip sits above terminal interfaces.

The user space only approach is to use pty/tty pairs as things like
xterm do. This gives you a "terminal/serial" device the other end of
which is your user space program which can do the conversions it wants
then talk to a real serial port


  reply	other threads:[~2003-07-23 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-23 14:15 Kurt Häusler
2003-07-23 14:25 ` Alan Cox [this message]
2003-07-24  8:26   ` Nick Craig-Wood

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=1058970342.5520.74.camel@dhcp22.swansea.linux.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=Kurt@fub-group.de \
    --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

all inboxes | Powered by JetHome®