Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbdF3RYA (ORCPT ); Fri, 30 Jun 2017 13:24:00 -0400 Received: from www.llwyncelyn.cymru ([82.70.14.225]:42428 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751072AbdF3RX7 (ORCPT ); Fri, 30 Jun 2017 13:23:59 -0400 Date: Fri, 30 Jun 2017 18:23:55 +0100 From: Alan Cox To: "Enrico Weigelt, metux IT consult" Cc: linux-kernel@vger.kernel.org Subject: Re: Directly accessing serial ports from drivers w/o TTYs ? Message-ID: <20170630182355.42c2e22b@alans-desktop> In-Reply-To: References: <20170626155115.13617ed6@alans-desktop> 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 801 Lines: 21 > I was thinking about something that looks like serdev from consumer > side, but instead directly works on struct uart_port, w/o actually > allocating a tty (and also the funny things like signals, etc). uart_port is only a subset of tty devices and also relies upon tty for some of the locking and other behaviour. > > Why do you need to do otherwise ? > > Maybe it could offer better performance ? Unless you have very tight latency requirements I would be surprised if you could do that much better even on a slow machine. If you don't need tty semantics then you can probably beat it hands down by writing your own custom driver for the hardware that doesn't pretend to be a tty in the first place. The cost in the tty stack is pretty much all the Unix tty API and POSIX guarantees. Alan