From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Pavel Machek <pavel@ucw.cz>
Cc: Richard Purdie <rpurdie@rpsys.net>,
kernel list <linux-kernel@vger.kernel.org>,
lenz@cs.wisc.edu
Subject: Re: [rfc] separate sharpsl_pm initialization from sysfs code
Date: Mon, 13 Mar 2006 00:02:31 +0000 [thread overview]
Message-ID: <20060313000231.GA6555@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20060310180719.GD8018@elf.ucw.cz>
On Fri, Mar 10, 2006 at 07:07:20PM +0100, Pavel Machek wrote:
> /* Register interrupt handler. */
> if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, SA_INTERRUPT,
> "ACIN", sharpsl_ac_isr))) {
> printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_AC_IN);
> return;
> }
> if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, SA_INTERRUPT,
> "CO", sharpsl_chrg_full_isr))) {
> free_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr);
> printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_CO);
> return;
> }
Shouldn't these be ucb1x00_hook_irq()'s?
Shouldn't you only enable the ADC when you need to use it?
This driver makes no calls to ucb1x00_enable() and ucb1x00_disable().
They're part of power management, and if your driver doesn't appear to
require them to work, that means some other code is buggy (or you're
keeping the ADC always enabled.)
In order to get maximum power savings, you should ensure that drivers
only call ucb1x00_enable() when they need to and ucb1x00_disable() as
soon as they can complete the operation. Ditto for ucb1x00_adc_enable()
and ucb1x00_adc_disable() - don't use ucb1x00_enable() and
ucb1x00_adc_enable() from a probe/initialisation function and then
leave it alone. Unless you want to needlessly waste power.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
next prev parent reply other threads:[~2006-03-13 0:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 12:42 [rfc] separate sharpsl_pm initialization from sysfs code Pavel Machek
2006-03-09 13:33 ` Richard Purdie
2006-03-10 18:07 ` Pavel Machek
2006-03-13 0:02 ` Russell King [this message]
2006-03-22 9:37 ` 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=20060313000231.GA6555@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=lenz@cs.wisc.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rpurdie@rpsys.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