linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pl011: added clock management feature
Date: Wed, 10 Nov 2010 17:11:04 +0000	[thread overview]
Message-ID: <20101110171104.GC27571@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <0CBD3CD1188FB94093DB405A20CBCFBE06C5C4D8D2@EXMB01.eu.tieto.com>

On Wed, Nov 10, 2010 at 10:15:53AM +0200, Grzegorz.Sygieda at tieto.com wrote:
> The main goal was to disable/enable clock while port open. This is usefull
> for scenario, where some higher level driver wants to control the power
> consumption (using set_termios). In the same time a user-space app (eg.
> hciattach) is still bounded to the specific /dev/tty* device associated
> with particular uart. From user POV device is always open, and app does
> not have to respawn, and we can save power.

If a port is open, and bound (eg to a bluetooth hci), how does the higher
level decide whether to place the port in low power mode?  How does it
know that there isn't going to be characters sent to the port?

When the port is in this low power mode, it's as good as closed from the
external world point of view.

I don't like this idea because I really can't see how it could be used
effectively - there isn't really any way for a bound protocol to know
whether there's characters expected to be received or not.  Either the
port is open and in use, or it isn't.

Let's take an example of a modem waiting for an incoming call.  It spends
most of its time waiting for the call.  You could argue that you could
shut the clock off to the port to save power - but then how do you receive
the "RING" message from the modem?  As you've shut the clock off, you're
not going to detect the activity on the receive line.

I'm sure that also applies to bluetooth as well, especially if you're a
'client' device - as long as the port is attached, bluetooth probably
expects to be able to listen to what's going on so the device can be
discovered.

It's all very well adding hooks to the transmit path to ensure that there
clock is on while there's characters to be sent, but this really doesn't
help you on the receive side.

I'm worried...

  parent reply	other threads:[~2010-11-10 17:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-09 15:30 [PATCH] pl011: added clock management feature Linus Walleij
2010-11-09 15:44 ` Russell King - ARM Linux
2010-11-09 22:40 ` Greg KH
2010-11-10  0:01   ` Russell King - ARM Linux
2010-11-10  7:54     ` Grzegorz.Sygieda at tieto.com
2010-11-10  8:15     ` Grzegorz.Sygieda at tieto.com
2010-11-10 17:00       ` Greg KH
2010-11-10 17:11       ` Russell King - ARM Linux [this message]
2010-11-17  8:24         ` Grzegorz.Sygieda at tieto.com
2010-12-03 11:47   ` Vitaly Wool
2010-12-03 15:15     ` Russell King - ARM Linux
2010-12-06  9:53       ` Vitaly Wool
2010-12-06 10:14         ` Russell King - ARM Linux
2010-12-06 12:23           ` Par-Gunnar HJALMDAHL

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=20101110171104.GC27571@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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).