All of lore.kernel.org
 help / color / mirror / Atom feed
From: rjw@sisk.pl (Rafael J. Wysocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cpufreq: dbx500: Round to closest available freq
Date: Thu, 11 Apr 2013 23:33:31 +0200	[thread overview]
Message-ID: <1512269.3ZuqNVLx3s@vostro.rjw.lan> (raw)
In-Reply-To: <CACRpkdb75wPjXEYdkqE6BOCsuFA_ZBc6GAz1m-5vHWSrSGKyUA@mail.gmail.com>

On Thursday, April 11, 2013 10:33:07 PM Linus Walleij wrote:
> On Wed, Apr 10, 2013 at 3:06 PM, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> 
> > From: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
> >
> > When reading the cpu speed, round it to the closest available
> > frequency from the table.
> >
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > Signed-off-by: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
> 
> (...)
> > +       /* The value is rounded to closest frequency in the defined table. */
> > +       while (freq_table[i + 1].frequency != CPUFREQ_TABLE_END) {
> > +               if (freq < freq_table[i].frequency +
> > +                  (freq_table[i + 1].frequency - freq_table[i].frequency) / 2)
> >                         return freq_table[i].frequency;
> 
> Oh that works, clever.
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks, applied.

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

WARNING: multiple messages have this Message-ID (diff)
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Ulf Hansson <ulf.hansson@stericsson.com>,
	cpufreq@vger.kernel.org,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Rickard Andersson <rickard.andersson@stericsson.com>,
	Mats Fagerstrom <mats.fagerstrom@stericsson.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Subject: Re: [PATCH] cpufreq: dbx500: Round to closest available freq
Date: Thu, 11 Apr 2013 23:33:31 +0200	[thread overview]
Message-ID: <1512269.3ZuqNVLx3s@vostro.rjw.lan> (raw)
In-Reply-To: <CACRpkdb75wPjXEYdkqE6BOCsuFA_ZBc6GAz1m-5vHWSrSGKyUA@mail.gmail.com>

On Thursday, April 11, 2013 10:33:07 PM Linus Walleij wrote:
> On Wed, Apr 10, 2013 at 3:06 PM, Ulf Hansson <ulf.hansson@stericsson.com> wrote:
> 
> > From: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
> >
> > When reading the cpu speed, round it to the closest available
> > frequency from the table.
> >
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > Signed-off-by: Mats Fagerstrom <mats.fagerstrom@stericsson.com>
> 
> (...)
> > +       /* The value is rounded to closest frequency in the defined table. */
> > +       while (freq_table[i + 1].frequency != CPUFREQ_TABLE_END) {
> > +               if (freq < freq_table[i].frequency +
> > +                  (freq_table[i + 1].frequency - freq_table[i].frequency) / 2)
> >                         return freq_table[i].frequency;
> 
> Oh that works, clever.
> 
> Acked-by: Linus Walleij <linus.walleij@linaro.org>

Thanks, applied.

Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-04-11 21:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 13:06 [PATCH] cpufreq: dbx500: Round to closest available freq Ulf Hansson
2013-04-10 13:06 ` Ulf Hansson
2013-04-11 20:33 ` Linus Walleij
2013-04-11 20:33   ` Linus Walleij
2013-04-11 21:33   ` Rafael J. Wysocki [this message]
2013-04-11 21:33     ` Rafael J. Wysocki
2013-04-11 21:52     ` Troy Kisky
2013-04-11 21:52       ` Troy Kisky

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=1512269.3ZuqNVLx3s@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.