From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] the right way to use gpiolib hooks to automate power management?
Date: Thu, 12 Aug 2010 19:27:44 +0100 [thread overview]
Message-ID: <20100812182744.GC31982@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <4C6423C1.9060509@codeaurora.org>
On Thu, Aug 12, 2010 at 09:39:29AM -0700, Gregory Bean wrote:
> On MSM, we have a bank of gpios whose physical characteristics are
> controlled via a 'gpiomux' subsystem, which sets things like drive
> strength, pull-up, pull-down, gpio functional assignment, and the like.
>
> We have a written a software driver which reference-counts these gpio
> lines (via a put()/get() api), putting them in their "high-power" active
> configurations when they're in use, and dropping them down into a
> high-impedance low-power setting when they're not.
Beware. What you're suggesting can lead to an increase in power
consumption rather than the reduction you're looking for.
Inputs don't like to float at mid-rail (mid-rail is absolutely the _worst_
thing you can do with an unused input.) Mid-rail means both transistors
on the input are partially turned on, thereby causing current to flow
between the supply rail through these transistors down to ground.
This is also exactly the same reason why power consumption is related to
clock speeds - when an input changes state, there's an overlap between one
transistor turning on and the other turning off, which causes a pulse of
current to be taken.
It's far better, not only for power consumption reasons but also ESD
sensitivity reasons to have unused outputs actively driven to their
appropriate inactive level.
Consider that output you're about to switch to a high impedance state
(which makes it appear as an input.) Have you first checked that there's
a pull-up or pull-down resistor on the signal, or have you just created
the situation where the device has become more sensitive to electrical
noise and increased its (and the connected device) quiescent power
dissipation?
next prev parent reply other threads:[~2010-08-12 18:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-12 16:39 [RFC] the right way to use gpiolib hooks to automate power management? Gregory Bean
2010-08-12 18:27 ` Russell King - ARM Linux [this message]
2010-08-12 20:48 ` David Brown
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=20100812182744.GC31982@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).