From: mturquette@ti.com (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] [RFC] cpufreq: omap: scale regulator from clk notifier
Date: Tue, 17 Jul 2012 08:42:54 -0700 [thread overview]
Message-ID: <20120717154254.GA3340@gmail.com> (raw)
In-Reply-To: <5004F638.6020301@nvidia.com>
On 20120717-10:50, Prashant Gaikwad wrote:
> On Saturday 14 July 2012 05:46 AM, Mike Turquette wrote:
> >+ /* scaling up? scale voltage before frequency */
> >+ if (cnd->new_rate> cnd->old_rate) {
> >+ dev_dbg(mpu_dev, "cpufreq-omap: %d mV --> %d mV\n",
> >+ volt_old, volt_new);
> >+
> >+ ret = regulator_set_voltage(mpu_reg, volt_new - tol, volt_new + tol);
> >+
> >+ if (ret< 0) {
> >+ dev_warn(mpu_dev, "%s: unable to scale voltage up.\n",
> >+ __func__);
> >+ return NOTIFY_BAD;
> >+ }
> >+ }
> >+
> >+ /* scaling down? scale voltage after frequency */
> >+ if (cnd->new_rate< cnd->old_rate) {
> >+ dev_dbg(mpu_dev, "cpufreq-omap: %d mV --> %d mV\n",
> >+ volt_old, volt_new);
> >+
> >+ ret = regulator_set_voltage(mpu_reg, volt_new - tol, volt_new + tol);
> >+
> >+ if (ret< 0) {
> >+ dev_warn(mpu_dev, "%s: unable to scale voltage down.\n",
> >+ __func__);
> >+ return NOTIFY_BAD;
> >+ }
> > }
>
> How are you checking pre and post rate change condition here? Need
> switch case for event?
>
Oops. This version of the patch is missing that. I previously had a
version of the patch which did pre/post checking but all of this code
was in arch/arm/mach-omap2/. It looks like when I moved things around I
accidentally dropped that bit.
Anyways that is trivial to do and simply changes like the following:
if (cnd->new_rate > cnd->old_rate && flags & CLK_PRE_RATE_CHANGE)
...
if (cnd->new_rate < cnd->old_rate && flags & CLK_POST_RATE_CHANGE)
...
Regards,
Mike
prev parent reply other threads:[~2012-07-17 15:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-14 0:16 [PATCH 0/2] [RFC] reentrancy in the common clk framework Mike Turquette
2012-07-14 0:16 ` [PATCH 1/2] [RFC] clk: reentrancy via per-clock locking Mike Turquette
2012-07-14 0:16 ` [PATCH 2/2] [RFC] cpufreq: omap: scale regulator from clk notifier Mike Turquette
2012-07-16 22:28 ` Linus Walleij
2012-07-16 23:22 ` Turquette, Mike
2012-07-20 13:26 ` Sekhar Nori
2012-07-17 5:20 ` Prashant Gaikwad
2012-07-17 15:42 ` Mike Turquette [this message]
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=20120717154254.GA3340@gmail.com \
--to=mturquette@ti.com \
--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).