From: Peter Hurley <peter-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
To: One Thousand Gnomes
<gnomes-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
Cc: NeilBrown <neilb-l3A5Bk7waGM@public.gmane.org>,
Grant Likely
<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Jiri Slaby <jslaby-AlSwsSmVLrQ@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/3] TTY: add support for "tty slave" devices.
Date: Tue, 16 Dec 2014 11:14:06 -0500 [thread overview]
Message-ID: <54905A4E.6060205@hurleysoftware.com> (raw)
In-Reply-To: <20141213142344.61372b92-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
On 12/13/2014 09:23 AM, One Thousand Gnomes wrote:
> On Fri, 12 Dec 2014 08:02:48 -0500
>> Which brings up another point: why not do this in the runtime power management;
>> ie, turn on the slave device when the master device is turned on? Sebastian
>> recently made the 8250 driver power-managed per access, which would enable
>> significant power savings over just leaving the slave device on the whole time.
>
> That per access model only works on 8250 (in fact only on some 8250). On
> most devices if the UART is in low power you lose bytes send to it rather
> than then queuing up anywhere.
>
> It doesn't handle cases where you need to keep power on to different rules
> (for example there are cases where you do things like power the uart down
> after no bits have been received for 'n' millseconds). Right now if you
> look into Androidspace you'll find people doing this in userspace by
> having the sysfs node open and playing crazy games with sysfs, Android
> glue hacks and gpio poking via the gpio sysfs/gpio lib routines.
>
> Good example is some of the GPS and serial based sensor chips. The
> latency of tty open/close is unacceptable and risks losing bits so they
> keep the tty open and whack the power management by hand right now.
>
> The kind of thing many of them want is stuff like
>
> "hold power on until we see receive data, then keep it on until it shuts
> up for a bit"
>
> "assert gpio, send, receive, wait idle, drop gpio"
>
> "on GPIO interrupt wake uart, wait for data, when idle, power uart down"
>
>>>> 2) why is this tied to the tty core and not the serial core
>>>> if this is only for UART?
>>>
>>> Because the knowledge of "the device is being opened" or "the device is being
>>> closed" seems to exist in the tty core but not in the serial core.
>>
>> uart_open() = device file is being opened
>> uart_close() = device file is being released
>
> Only for a subset of uart type devices that use the uart layer. Quite a
> few don't, including all the USB ones, and the sd ones.
>
>>> I'm happy to move it to serial_core.c if that is preferred.
>>> I'll also move the open/close handling if you can point to where it should go.
>>
>> Yes, please.
>
> NAK - I certainly object to it being moved to uart. That's the wrong
> abstraction layer for this. It's a generic behaviour, it's a tty level
> behaviour without any uart specific properties. It should work for uarts
> that don't use the legacy serial_core code, uarts that do, uarts that use
> USB, uarts that are directly connected to things like sdio etc.
>
> That means it has to be tty layer.
I was reviewing the patch submitted, which does none of the things you
outlined and does not provide the necessary infrastructure to build upon it.
I'm all for the functionality you describe but I think that design will end
up subsystem-agnostic.
Regards,
Peter Hurley
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-12-16 16:14 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-11 21:59 [PATCH 0/3] Add support for 'tty-slaves' described by devicetree NeilBrown
2014-12-11 21:59 ` [PATCH 2/3] TTY: add slave driver to power-on device via a regulator NeilBrown
[not found] ` <20141211215944.4127.4186.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-11 22:58 ` Sebastian Reichel
2014-12-12 0:46 ` Marcel Holtmann
2014-12-12 1:31 ` Sebastian Reichel
2014-12-12 5:01 ` NeilBrown
2014-12-11 23:32 ` Peter Hurley
2014-12-12 5:27 ` NeilBrown
[not found] ` <20141212162714.3a2378df-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-12 11:59 ` Peter Hurley
2014-12-12 12:05 ` Grant Likely
2014-12-11 21:59 ` [PATCH 3/3] TTY/slave: add driver for w2sg0004 GPS NeilBrown
[not found] ` <20141211215944.4127.57146.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-11 23:04 ` Sebastian Reichel
2014-12-11 23:11 ` One Thousand Gnomes
[not found] ` <20141211231100.05782a30-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2014-12-12 5:06 ` NeilBrown
[not found] ` <20141212160607.361d20db-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-15 11:39 ` One Thousand Gnomes
2014-12-12 12:11 ` Grant Likely
2014-12-11 21:59 ` [PATCH 1/3] TTY: add support for "tty slave" devices NeilBrown
[not found] ` <20141211215943.4127.24792.stgit-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-11 22:41 ` Sebastian Reichel
2014-12-11 23:18 ` Peter Hurley
[not found] ` <548A264D.8070103-WaGBZJeGNqdsbIuE7sb01tBPR1lH4CV8@public.gmane.org>
2014-12-12 5:23 ` NeilBrown
[not found] ` <20141212162352.66be5b5e-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2014-12-12 13:02 ` Peter Hurley
2014-12-13 14:23 ` One Thousand Gnomes
[not found] ` <20141213142344.61372b92-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
2014-12-16 16:14 ` Peter Hurley [this message]
2014-12-13 14:12 ` One Thousand Gnomes
2014-12-12 11:59 ` Grant Likely
2014-12-13 17:46 ` Sebastian Reichel
2014-12-13 22:22 ` Grant Likely
2014-12-28 14:20 ` Pavel Machek
2015-01-02 21:33 ` NeilBrown
2015-01-04 10:18 ` Pavel Machek
2015-01-05 7:09 ` NeilBrown
[not found] ` <20150105200936.2ba8f596-wvvUuzkyo1EYVZTmpyfIwg@public.gmane.org>
2015-01-05 13:43 ` Pavel Machek
2015-01-05 15:41 ` One Thousand Gnomes
2015-01-05 16:28 ` 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=54905A4E.6060205@hurleysoftware.com \
--to=peter-wagbzjegnqdsbiue7sb01tbpr1lh4cv8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gnomes-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org \
--cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=jslaby-AlSwsSmVLrQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=neilb-l3A5Bk7waGM@public.gmane.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;
as well as URLs for NNTP newsgroup(s).