From: Mark Brown <broonie@kernel.org>
To: yi zhang <yizhang.mrvl@gmail.com>
Cc: lgirdwood@gmail.com, cxie4@marvell.com, jett.zhou@marvell.com,
linux-kernel@vger.kernel.org, Yi Zhang <yizhang@marvell.com>
Subject: Re: [PATCH] regulator: 88pm800: add regulator driver
Date: Sat, 25 May 2013 15:56:01 -0400 [thread overview]
Message-ID: <20130525195601.GJ7660@sirena.org.uk> (raw)
In-Reply-To: <CAK=oMXepj7tmZJ3=b9ja+E1N9eAPmsPhBefAzoswVyGWBXwNOA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 924 bytes --]
On Fri, May 24, 2013 at 11:01:45AM +0800, yi zhang wrote:
> 2013/5/23 Mark Brown <broonie@kernel.org>:
> > On Wed, May 22, 2013 at 08:10:53PM +0800, yizhang.mrvl@gmail.com wrote:
> >> +static const unsigned int BUCK1_table[] = {
> >> + /* 0x00-0x4F: from 0.6 to 1.5875V with step 0.0125V */
> >> + /* 0x50-0x7F: from 1.6 to 1.8V with step 0.05V */
> > Write this out as code, don't use a big table for large sets of
> > voltages.
> The voltage table is "const", if we write it out as code, seems
> it's hard for us
> to keep this attribute;
> And the voltage of this BUCK is not linear(it's separated as two parts),
> seems I shouldn't use the framework helpers to implement it; Right?
> what do you think?
You should open code the mapping functions but you should still do this
as calcuations, it's faster and produces smaller code. You'll need a
small function with an if statement.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-05-26 20:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-22 12:10 yizhang.mrvl
2013-05-22 16:14 ` Mark Brown
2013-05-24 3:01 ` yi zhang
2013-05-25 19:56 ` Mark Brown [this message]
2013-05-28 2:32 ` yi zhang
2013-05-28 10:04 ` Mark Brown
2013-05-28 12:10 ` Chao Xie
2013-05-28 14:20 ` 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=20130525195601.GJ7660@sirena.org.uk \
--to=broonie@kernel.org \
--cc=cxie4@marvell.com \
--cc=jett.zhou@marvell.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=yizhang.mrvl@gmail.com \
--cc=yizhang@marvell.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
all inboxes | Powered by JetHome®