From: NeilBrown <neil@brown.name>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
Peter Hurley <peter@hurleysoftware.com>,
Arnd Bergmann <arnd@arndb.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Reichel <sre@kernel.org>,
Rob Herring <robherring2@gmail.com>, Pavel Machek <pavel@ucw.cz>,
Grant Likely <grant.likely@linaro.org>,
Jiri Slaby <jslaby@suse.cz>,
GTA04 owners <gta04-owner@goldelico.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/4] UART slave device support - version 4
Date: Wed, 12 Aug 2015 09:20:59 +1000 [thread overview]
Message-ID: <20150812092059.361e09bc@home.neil.brown.name> (raw)
In-Reply-To: <CACRpkdZf2AM_7Od1kVcBxokK5CJfhnsfZ_oNSF5w7rmZmcenCg@mail.gmail.com>
On Fri, 7 Aug 2015 15:01:47 +0200 Linus Walleij
<linus.walleij@linaro.org> wrote:
> Hi Neil,
>
> first, this is a *VERY* interesting and much needed patch series,
> I intend to look closer at it, and if possible test it with some
> (heh) board file device. Would be happy of you put me on CC for these.
>
> On Mon, May 11, 2015 at 3:56 AM, NeilBrown <neil@brown.name> wrote:
>
> > When a device is connected to a UART via RS-232 (or similar), there
> > is a DTR line that can be used for power management, and other "modem
> > control" lines.
> >
> > On an embedded board, it is very likely that there is no "DTR", and
> > any power management need to be done using some completely separate
> > mechanism.
> >
> > So these "slaves" are really just for devices permanently attached to
> > UARTs without a full "RS-232" (or similar) connection. The driver
> > does all the extra control beyond Tx/Rx.
>
> What is usually happening (and I have seen it in a few places) is that
> the SoC has *one* fully featured RS232 with CTS/RTS and even
> DTS,DCD,RI and other esoterica, which is intended to be connected to a
> host serial port or so, for example if this SoC is to act as a modem
> or a fax machine, or if it is to drive one.
>
> Then they often have a few more UART blocks, usually identical, which
> only have RxD+TxD available, so they are "just" UARTs.
>
> To complicate things further, you may wonder what happened with
> the CTS/RTS (etc) signals from the other blocks. Usually they are there
> in the silicon but just routed to dead ends.
>
> To complicate it even further, usually all these pins are placed under
> pin control multiplexing, so in an actual electronic design, the
> system will mux out CTS/RTS (etc) from the fully featured RS232
> blocks and only use them as UARTs anyways.
>
> Then there are those who created real simple RxD/TxD-only UARTs
> ("yeah lets dump this RS232 legacy crap" / "yeah yeah")
> and then realized they want to drive modems ("oh crap, it seemed
> like a good idea at the time"). Then they usually take
> two GPIO pins for CTS/RTS and drive them as GPIOs using
> software and you have a cheap 4-line modem line. This is what
> drivers/tty/serial/serial_mctrl_gpio.c is for if you wondered.
>
> > I've tested this set and it seems to work ... except that something
> > is sadly broken with bluetooth support in 4.1-rc1 so I've only really
> > tested the GPS driver. I guess it is time to rebase to -rc3.
>
> You have a hardware taget I see. Which one?
GTA04 (www.gta04.org - openmoko successor).
3 uarts on OMAP3 are wired: one as RS-232 for console, one to bluetooth
half of a wifi/bluetooth module, and one to a GPS.
For the GPS, I just want to power on/off when the TTY is opened/closed,
but the power-on sequence is non-trivial as both "turn on" and
"turn-off' toggle the same line, so I need to be able to detect current
state.
For the bluetooth, the power is a (shared) regulator. As well as
power-on when the TTY is opened, I'd like regulator to be turned of
when I "hciconfig down" - even though the TTY is still open.
I did a patch a while ago which hooked in to hci_uart_{open,close} to
make this work, but it isn't a really good patch.
It would be nice to hide the TTY from user-space in the bluetooth case,
and have the "hciattach" happen in the kernel, but I think hciattach
does extra initialisation...
NeilBrown
next prev parent reply other threads:[~2015-08-11 23:21 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 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 1/4] TTY: use class_find_device to find port in uart_suspend/resume 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 [this message]
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
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=20150812092059.361e09bc@home.neil.brown.name \
--to=neil@brown.name \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=gnomes@lxorguk.ukuu.org.uk \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=gta04-owner@goldelico.com \
--cc=jslaby@suse.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--cc=peter@hurleysoftware.com \
--cc=robherring2@gmail.com \
--cc=sre@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®