mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
To: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Directly accessing serial ports from drivers w/o TTYs ?
Date: Mon, 26 Jun 2017 15:51:15 +0100	[thread overview]
Message-ID: <20170626155115.13617ed6@alans-desktop> (raw)
In-Reply-To: <a159c02b-cec6-51a5-3bde-b0e8eab74055@gr13.net>

On Mon, 26 Jun 2017 00:43:12 +0200
"Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> wrote:

> Hi folks,
> 
> 
> is there already a way for accessing serial ports from drivers,
> w/o having to go through the TTY subsystem ?
> 
> Serdev seems provide a connection between arbitrary TTYs to device
> drivers. But this implies always having a TTY for each UART (even if
> it's never used outside the kernel).
> 
> Is there any way for accessing uarts more directly ?

You can write your own driver for the physical hardware and claim it in
your driver. Shouldn't normally be needed except for bizarre cases when a
serial link is used for something very non tty like (eg as GPIO lines).

Otherwise all the low level tty device locking, queues and interfaces
assume there is a tty_struct attached to it, so yes you need a tty
struct.

Why do you need to do otherwise ?

Alan

  reply	other threads:[~2017-06-26 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 22:43 Enrico Weigelt, metux IT consult
2017-06-26 14:51 ` Alan Cox [this message]
2017-06-29 11:44   ` Enrico Weigelt, metux IT consult
2017-06-30 17:23     ` Alan Cox

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=20170626155115.13617ed6@alans-desktop \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=enrico.weigelt@gr13.net \
    --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

Powered by JetHome