Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674842

Re: Directly accessing serial ports from drivers w/o TTYs ?

Path csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod
From Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Newsgroups linux.kernel
Subject Re: Directly accessing serial ports from drivers w/o TTYs ?
Date Mon, 26 Jun 2017 17:00:02 +0200
Message-ID <tWDEC-3EY-19@gated-at.bofh.it> (permalink)
References <tWovT-2uQ-11@gated-at.bofh.it>
X-Original-To "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
Organization Intel Corporation
X-Mailer Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 26
X-Original-Cc linux-kernel@vger.kernel.org
X-Original-Date Mon, 26 Jun 2017 15:51:15 +0100
X-Original-Message-ID <20170626155115.13617ed6@alans-desktop>
X-Original-References <a159c02b-cec6-51a5-3bde-b0e8eab74055@gr13.net>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1674842

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Directly accessing serial ports from drivers w/o TTYs ? "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> - 2017-06-26 00:50 +0200
  Re: Directly accessing serial ports from drivers w/o TTYs ? Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-06-26 17:00 +0200
    Re: Directly accessing serial ports from drivers w/o TTYs ? "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> - 2017-06-29 13:50 +0200
      Re: Directly accessing serial ports from drivers w/o TTYs ? Alan Cox <gnomes@lxorguk.ukuu.org.uk> - 2017-06-30 19:30 +0200

csiph-web