From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: Rob Herring <robh@kernel.org>,
Vostrikov Andrey <andrey.vostrikov@cogentembedded.com>,
Mark Rutland <mark.rutland@arm.com>,
Peter Hurley <peter@hurleysoftware.com>,
Rob Herring <robherring2@gmail.com>,
List for communicating with real GTA04 owners
<gta04-owner@goldelico.com>,
tomeu@tomeuvizoso.net, NeilBrown <neil@brown.name>,
Arnd Bergmann <arnd@arndb.de>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Reichel <sre@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Jiri Slaby <jslaby@suse.cz>, Marek Belisko <marek@goldelico.com>
Subject: Re: [Gta04-owner] [PATCH 0/4] UART slave device support - version 4
Date: Sun, 17 Jan 2016 19:38:49 +0000 [thread overview]
Message-ID: <20160117193849.69d00c28@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <1D5F146E-D347-453B-9158-8D269F8DA99C@goldelico.com>
> 3. mechanism to open/close the UART by the peer driver (for power management of the
> UART), even if it there is a user-space tty client for the same UART which might or might
> not be open at any time. Manage that in an optimal way.
Power management doesn't have to go via the uart layer. You can even
manage it via the existing sysfs power interfaces (and some Android
devices do in fact do exactly that either by controlling the uart pm or
using a gpio line). Not pretty either but means people are only peeing
in their own backyard. What goes into the kernel costs *everyone*, what
goes in device user space costs only the perpetrator.
It would help to rewind and understand what your needs are not what your
implementation as it stands is. Why can't you just use hciattach like
everyone else ? Improving the PM logic by refining the existing hci
ldisc to be power smart so everyone benefits from any improvement might
be a useful other discussion.
The 8686 is already working in serial mode with no kernel hackery on
other boards.
> For the GPS chip I am only interested in mctrl and if characters are received. But
> I still want them to arrive at user space through a standard tty interface. So a solution
> that does not interwork and cooperate with the tty layer is not a useable solution for
> my requirements.
Why does it matter how they arrive so long as your user space can
interpret it correctly. Or is your user space some proprietary blob you
can't change ?
Them arriving by a tty interface is fine - no issue with that providing
it doesn't need to mess up core code.
> The reason appears to sit here:
>
> http://lxr.free-electrons.com/source/drivers/tty/serial/serial_core.c#L2725
>
> This means that as soon as some UART is successfully probed, a new tty
> interface is created for it. So we simply have to optionally disable it. This is
> described by requirement 6.
You can just report EBUSY in your open method. You don't need to touch
the serial core layer. It's quite sufficient to do
if (busy)
return -EBUSY;
at the top of your uart open method.
> UART drivers we have and work with any of them. This is why I think
> serial-core and struct uart_port is the right level. Even if it looks like a hack.
Your "looks like" instinct is IMHO bang on - looks like a hack, is a
hack. It's also unnecessary as you can hide it in your open method if you
must do that.
> So please wait until I have updated the patch set of our proposal. Then you
> can see that we do not directly touch the tty layer.
The uart layer is part of the tty layer. It's just a glue library to make
writing some tty drivers a bit easier. It's tied deeply to the tty_port
implementation. One day it might even cease to exist replaced by more
generic tty_port helpers.
The tty layer is also an *abstract* concept. There is no real world tie
between physical collections of shift registers that dribble bits to one
another and tty devices in the kernel. You only need a tty driver for
certain types of user interaction.
Alan
next prev parent reply other threads:[~2016-01-17 19:39 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 1:56 NeilBrown
2015-05-11 1:56 ` [PATCH 2/4] TTY: split tty_register_device_attr into 'initialize' and 'add' parts NeilBrown
2015-05-11 1:56 ` [PATCH 1/4] TTY: use class_find_device to find port in uart_suspend/resume NeilBrown
2015-05-11 1:56 ` [PATCH 3/4] TTY: add support for uart_slave devices NeilBrown
2015-05-12 8:31 ` Paul Bolle
2015-05-12 23:35 ` NeilBrown
2015-05-11 1:56 ` [PATCH 4/4] tty/slaves: add a driver to power on/off UART attached devices NeilBrown
2015-05-31 22:01 ` [PATCH 0/4] UART slave device support - version 4 Greg Kroah-Hartman
2015-08-07 13:01 ` Linus Walleij
2015-08-11 23:20 ` NeilBrown
2015-08-28 5:52 ` [Gta04-owner] " Dr. H. Nikolaus Schaller
2015-08-28 7:02 ` Pavel Machek
2015-08-28 9:43 ` Dr. H. Nikolaus Schaller
2015-08-28 11:04 ` Pavel Machek
2015-08-28 20:04 ` Christ van Willegen
2016-01-12 13:06 ` Tomeu Vizoso
2016-01-12 13:28 ` [Gta04-owner] " H. Nikolaus Schaller
2016-01-13 19:15 ` Mark Rutland
[not found] ` <1CD6CA14-AE4F-444F-A9A2-CF9B9485F2DC@goldelico.com>
2016-01-15 11:01 ` Mark Rutland
2016-01-15 15:05 ` H. Nikolaus Schaller
2016-01-15 15:43 ` Andrey Vostrikov
2016-01-15 16:08 ` H. Nikolaus Schaller
2016-01-15 17:16 ` Peter Hurley
2016-01-15 17:32 ` H. Nikolaus Schaller
2016-01-15 17:43 ` Peter Hurley
2016-01-15 17:58 ` H. Nikolaus Schaller
2016-01-15 19:23 ` Peter Hurley
2016-01-15 21:24 ` H. Nikolaus Schaller
2016-01-15 22:40 ` Rob Herring
2016-01-16 7:34 ` Vostrikov Andrey
2016-01-16 23:31 ` Rob Herring
2016-01-17 8:53 ` H. Nikolaus Schaller
2016-01-17 14:19 ` One Thousand Gnomes
2016-01-17 17:57 ` H. Nikolaus Schaller
2016-01-17 19:38 ` One Thousand Gnomes [this message]
2016-01-18 8:17 ` H. Nikolaus Schaller
2016-01-18 8:56 ` Andrey Vostrikov
2016-01-18 11:52 ` H. Nikolaus Schaller
2016-01-18 11:19 ` One Thousand Gnomes
2016-01-18 20:58 ` H. Nikolaus Schaller
2016-01-18 22:03 ` One Thousand Gnomes
2016-01-18 22:32 ` H. Nikolaus Schaller
2016-01-19 14:25 ` One Thousand Gnomes
2016-01-20 17:33 ` H. Nikolaus Schaller
2016-01-20 16:11 ` H. Nikolaus Schaller
2016-01-20 17:46 ` One Thousand Gnomes
2016-01-20 18:03 ` H. Nikolaus Schaller
2016-01-22 15:45 ` Tomeu Vizoso
2016-01-22 16:49 ` Rob Herring
2016-01-22 20:12 ` One Thousand Gnomes
2016-01-23 7:40 ` Andreas Kemnade
2016-01-23 12:19 ` H. Nikolaus Schaller
2016-01-23 17:28 ` One Thousand Gnomes
2016-01-23 22:04 ` H. Nikolaus Schaller
2016-01-24 17:10 ` One Thousand Gnomes
2016-01-25 10:36 ` H. Nikolaus Schaller
2016-01-19 6:32 ` Andreas Kemnade
2016-01-20 19:38 ` Dmitry Torokhov
2016-01-20 20:09 ` Vostrikov Andrey
2016-01-15 16:12 ` Mark Rutland
2016-01-15 19:16 ` H. Nikolaus Schaller
2016-01-15 19:40 ` Pavel Machek
2016-01-15 20:35 ` H. Nikolaus Schaller
2016-01-12 21:28 ` NeilBrown
2016-01-13 19:00 ` Pavel Machek
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=20160117193849.69d00c28@lxorguk.ukuu.org.uk \
--to=gnomes@lxorguk.ukuu.org.uk \
--cc=andrey.vostrikov@cogentembedded.com \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=gta04-owner@goldelico.com \
--cc=hns@goldelico.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=marek@goldelico.com \
--cc=mark.rutland@arm.com \
--cc=neil@brown.name \
--cc=peter@hurleysoftware.com \
--cc=robh@kernel.org \
--cc=robherring2@gmail.com \
--cc=sre@kernel.org \
--cc=tomeu@tomeuvizoso.net \
/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®