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 v4] GPIO PL061: Adding Clk framework support
Date: Tue, 3 Aug 2010 22:23:34 +0100	[thread overview]
Message-ID: <20100803212334.GC28048@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <083DF309106F364B939360100EC290F80AC39A091A@eu1rdcrdc1wx030.exi.nxp.com>

On Tue, Aug 03, 2010 at 02:40:39AM +0200, Kevin Wells wrote:
> One more item I noted. These changes want to keep the clock enabled
> after the probe - only disabling the clock on amba_remove. Both the
> AMBA peripheral driver (ie, the LCD or MMCI driver) and the amba_remove
> function now disable the clocks.

Absolutely correct.  If we enable the clock for the probe call, and then
disable it afterwards, then what do AMBA bus drivers which have registered
interrupt routines in their probe function do when they receive an
interrupt and want to access their statuc register?

Do we just let them go ahead and fault?  That's just stupid.

No, what we do is create a setup where existing drivers continue to work
without modification - and that means ensuring that the bus clock is
enabled for the duration that the driver is active.

As I've already said, if drivers then want to achieve greater power savings,
they need to use the supplied functions to manage the bus clock - with the
assumption that they will be called with the bus clock already enabled.
If a driver doesn't participate in managing the APB clock, then they don't
need to be modified.

> Wouldn't drivers that use clk_disable in their xxx_suspend functions
> have some problems with this as multiple clk_enables have been called?

Probably, and I left this intentionally open for the time being because
it wasn't clear whether the right action was to disable the bus clock
across a suspend.

However, thinking about it some more, it's probably safe to disable the
bus clock _after_ the driver specific suspend call has successfully
completed, and re-enable it before calling the resume method.  So let's
do this...

  parent reply	other threads:[~2010-08-03 21:23 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22  5:07 [PATCH v4] GPIO PL061: Adding Clk framework support Viresh KUMAR
2010-06-22 17:06 ` Baruch Siach
2010-07-09 12:40 ` Russell King - ARM Linux
2010-07-09 23:55   ` Linus Walleij
2010-07-10  7:19     ` Russell King - ARM Linux
2010-07-10  7:30       ` Russell King - ARM Linux
2010-07-10 15:36       ` Linus Walleij
2010-07-13  7:44         ` Russell King - ARM Linux
2010-07-13 11:00           ` Linus Walleij
2010-07-13 18:26             ` Russell King - ARM Linux
2010-07-15  6:02               ` Viresh KUMAR
2010-07-15  8:30                 ` Russell King - ARM Linux
2010-07-15  9:35                   ` Viresh KUMAR
2010-07-15  9:44                     ` Linus Walleij
2010-07-15  9:56                     ` Russell King - ARM Linux
2010-07-15 16:09                       ` Rabin Vincent
2010-07-15 16:22                         ` Russell King - ARM Linux
2010-07-29 23:22                       ` Kevin Wells
2010-07-30  7:09                         ` Russell King - ARM Linux
2010-08-03  0:40                           ` Kevin Wells
2010-08-03 13:00                             ` Linus Walleij
2010-08-03 20:36                               ` Kevin Wells
2010-08-03 21:23                             ` Russell King - ARM Linux [this message]
2010-07-30 15:19                         ` Linus Walleij
2010-07-12  4:07   ` Viresh KUMAR
2010-07-12  7:53     ` Linus Walleij
2010-07-12  8:07     ` Russell King - ARM Linux
2010-07-12  8:18       ` Viresh KUMAR
2010-07-12  8:34         ` Russell King - ARM Linux

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=20100803212334.GC28048@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).