From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Rajendra Nayak <rnayak@ti.com>
Cc: linux-omap@vger.kernel.org, Liam Girdwood <lrg@slimlogic.co.uk>,
Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 1/2] twl6030: regulator: Fix vsel calculations in set/get voltage apis
Date: Wed, 17 Feb 2010 16:15:09 +0000 [thread overview]
Message-ID: <20100217161509.GA13324@rakim.wolfsonmicro.main> (raw)
In-Reply-To: <1266420255-4307-1-git-send-email-rnayak@ti.com>
On Wed, Feb 17, 2010 at 08:54:14PM +0530, Rajendra Nayak wrote:
> /* use the first in-range value */
> - if (min_uV <= uV && uV <= max_uV)
> + if (min_uV <= uV && uV <= max_uV) {
> + if (twl_class_is_6030())
> + /*
> + * Use the below formula to calculate vsel
> + * mV = 1000mv + 100mv * (vsel - 1)
> + */
> + vsel = (LDO_MV(mV) - 1000)/100 + 1;
> return twlreg_write(info, TWL_MODULE_PM_RECEIVER,
> VREG_VOLTAGE, vsel);
This looks wrong - this code is inside a loop over vsel->voltage
mappings, if that mapping is wrong and needs to be ignored (which is
what this code is doing) then we shouldn't be looking at it at all.
next prev parent reply other threads:[~2010-02-17 16:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-17 15:24 [PATCH 1/2] twl6030: regulator: Fix vsel calculations in set/get voltage apis Rajendra Nayak
2010-02-17 15:24 ` [PATCH 2/2] twl6030: regulator: Configure STATE register instead of REMAP Rajendra Nayak
2010-02-17 16:15 ` Mark Brown
2010-02-18 12:33 ` Liam Girdwood
2010-02-17 16:15 ` Mark Brown [this message]
2010-02-18 6:32 ` [PATCH 1/2] twl6030: regulator: Fix vsel calculations in set/get voltage apis Nayak, Rajendra
2010-02-18 9:48 ` Mark Brown
2010-02-18 10:19 ` Nayak, Rajendra
2010-02-18 10:40 ` Mark Brown
2010-02-18 11:39 ` Nayak, Rajendra
2010-02-18 11:42 ` Mark Brown
2010-02-19 6:39 ` Nayak, Rajendra
2010-02-19 9:27 ` Mark 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=20100217161509.GA13324@rakim.wolfsonmicro.main \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-omap@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
--cc=rnayak@ti.com \
--cc=sameo@linux.intel.com \
/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