public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma633@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 10/16] pmic:max8997: Function for calculating LDO internal register value
Date: Mon, 17 Sep 2012 22:57:40 +0200	[thread overview]
Message-ID: <20120917225740.42b3a7d8@jawa> (raw)
In-Reply-To: <20120914172449.GC22028@bill-the-cat>

On Fri, 14 Sep 2012 10:24:49 -0700
Tom Rini <trini@ti.com> wrote:

> On Fri, Sep 14, 2012 at 05:40:09PM +0200, Lukasz Majewski wrote:
> 
> > Function for calculating LDO internal register value from passed
> > micro Volt.
> > 
> > Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > Cc: Stefano Babic <sbabic@denx.de>
> > ---
> >  drivers/misc/pmic_max8997.c |   17 +++++++++++++++++
> >  1 files changed, 17 insertions(+), 0 deletions(-)
> > 
> > diff --git a/drivers/misc/pmic_max8997.c
> > b/drivers/misc/pmic_max8997.c index 4e8283a..a4158e2 100644
> > --- a/drivers/misc/pmic_max8997.c
> > +++ b/drivers/misc/pmic_max8997.c
> > @@ -42,3 +42,20 @@ int pmic_init(unsigned char bus)
> >  
> >  	return 0;
> >  }
> > +
> > +unsigned char max8997_reg_ldo(int uV)
> > +{
> > +	unsigned char ret;
> > +	if (uV <= 800000)
> > +		return 0;
> > +	if (uV >= 3950000)
> > +		return 0x3f;
> > +	ret = (uV - 800000) / 50000;
> > +	if (ret > 0x3f) {
> > +		printf("MAX8997 LDO SETTING ERROR (%duV) -> %u\n",
> > uV, ret);
> > +		ret = 0x3f;
> > +	}
> 
> Can we get a comment to point at the doc that says what these values
> are?  Maybe even a #define for the return values.
> 

Yes, explanation will be provided.

Regards,
Lukasz Majewski

  reply	other threads:[~2012-09-17 20:57 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-14 15:39 [U-Boot] [PATCH 00/16] pmic: Redesign PMIC framework to support multiple instances of devices Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 01/16] pmic:i2c: Handle PMIC I2C transmission comprising of two bytes Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 02/16] pmic:i2c: Add I2C byte order to PMIC framework Lukasz Majewski
2012-09-17  9:33   ` Stefano Babic
2012-09-17 20:41     ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 03/16] pmic:max8997: Switch the MAX8997 PMIC to be used with multibus I2C Lukasz Majewski
2012-09-17  9:36   ` Stefano Babic
2012-09-17 20:46     ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 04/16] pmic: Extend PMIC framework to support multiple instances of PMIC devices Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 05/16] pmic: Introduce power_board_init() method at ./lib/board.c file Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 06/16] pmic: Enable power_board_init() support at TRATS Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 07/16] pmic:chrg: Common information about charger and battery (power_chrg.h) Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 08/16] pmic:muic: Support for MUIC built into MAX8997 device Lukasz Majewski
2012-09-17  9:51   ` Stefano Babic
2012-09-17 21:05     ` Lukasz Majewski
2012-10-02 12:49     ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 09/16] pmic:fuel-gauge: Support for MAX17042 fuel-gauge Lukasz Majewski
2012-09-14 17:23   ` Tom Rini
2012-09-17 20:59     ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 10/16] pmic:max8997: Function for calculating LDO internal register value Lukasz Majewski
2012-09-14 17:24   ` Tom Rini
2012-09-17 20:57     ` Lukasz Majewski [this message]
2012-09-14 15:40 ` [U-Boot] [PATCH 11/16] arm:trats:pmic: Default PMIC(MAX8997) initialization for Samsung's TRATS board Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 12/16] arm:trats:pmic: Enable MUIC (MAX8997) at " Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 13/16] arm:trats:pmic: Enable fuel-gauge (MAX17042) " Lukasz Majewski
2012-09-14 17:26   ` Tom Rini
2012-09-17 20:56     ` Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 14/16] pmic:max8997: Support for MAX8997 internal charger control Lukasz Majewski
2012-09-14 15:40 ` [U-Boot] [PATCH 15/16] arm:trats:pmic: Support for charging battery at Samsung's TRATS board Lukasz Majewski
2012-09-14 17:32   ` Tom Rini
2012-09-17 20:55     ` Lukasz Majewski
2012-09-17 21:27       ` Tom Rini
2012-09-14 15:40 ` [U-Boot] [PATCH 16/16] arm:trats:pmic: Power consumption reduction state for " Lukasz Majewski
2012-09-14 17:35 ` [U-Boot] [PATCH 00/16] pmic: Redesign PMIC framework to support multiple instances of devices Tom Rini
2012-09-17 20:49   ` Lukasz Majewski

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=20120917225740.42b3a7d8@jawa \
    --to=lukma633@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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