[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130525195601.GJ7660@sirena.org.uk>
Date: Sat, 25 May 2013 15:56:01 -0400
From: Mark Brown <broonie@...nel.org>
To: yi zhang <yizhang.mrvl@...il.com>
Cc: lgirdwood@...il.com, cxie4@...vell.com, jett.zhou@...vell.com,
linux-kernel@...r.kernel.org, Yi Zhang <yizhang@...vell.com>
Subject: Re: [PATCH] regulator: 88pm800: add regulator driver
On Fri, May 24, 2013 at 11:01:45AM +0800, yi zhang wrote:
> 2013/5/23 Mark Brown <broonie@...nel.org>:
> > On Wed, May 22, 2013 at 08:10:53PM +0800, yizhang.mrvl@...il.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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists