All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] power: LP8720 regulator support
Date: Tue, 4 Nov 2014 10:58:06 -0500	[thread overview]
Message-ID: <20141104155806.GL15133@bill-the-cat> (raw)
In-Reply-To: <1414839697.2912.4.camel@collins>

On Sat, Nov 01, 2014 at 12:01:37PM +0100, Paul Kocialkowski wrote:
> Le mardi 28 octobre 2014 ? 18:32 +0100, Paul Kocialkowski a ?crit :
> > This adds support for the LP8720 i2c regulator, as found in e.g. the LG
> > Optimus Black (P970), codename sniper. This code supports setting up and
> > enabling one of the 5 LDOs that the IC provides.
> > Other more advanced features are unsupported.
> > 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> > ---
> >  drivers/power/Makefile |    1 +
> >  drivers/power/lp8720.c |  107 ++++++++++++++++++++++++++++++++++++++++++++++++
> >  include/lp8720.h       |   93 +++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 201 insertions(+)
> >  create mode 100644 drivers/power/lp8720.c
> >  create mode 100644 include/lp8720.h
> > 
> > diff --git a/drivers/power/Makefile b/drivers/power/Makefile
> > index dc64e4d..65be5a0 100644
> > --- a/drivers/power/Makefile
> > +++ b/drivers/power/Makefile
> > @@ -9,6 +9,7 @@ obj-$(CONFIG_AXP152_POWER)	+= axp152.o
> >  obj-$(CONFIG_AXP209_POWER)	+= axp209.o
> >  obj-$(CONFIG_EXYNOS_TMU)	+= exynos-tmu.o
> >  obj-$(CONFIG_FTPMU010_POWER)	+= ftpmu010.o
> > +obj-$(CONFIG_LP8720_POWER)	+= lp8720.o
> >  obj-$(CONFIG_TPS6586X_POWER)	+= tps6586x.o
> >  obj-$(CONFIG_TWL4030_POWER)	+= twl4030.o
> >  obj-$(CONFIG_TWL6030_POWER)	+= twl6030.o
> > diff --git a/drivers/power/lp8720.c b/drivers/power/lp8720.c
> > new file mode 100644
> > index 0000000..ac7fc11
> > --- /dev/null
> > +++ b/drivers/power/lp8720.c
> > @@ -0,0 +1,107 @@
> > +/*
> > + * Copyright (C) 2014 Paul Kocialkowski <contact@paulk.fr>
> > + *
> > + * SPDX-License-Identifier:	GPL-2.0+
> > + */
> > +
> > +#include <common.h>
> > +#include <i2c.h>
> > +#include <asm/gpio.h>
> > +#include <lp8720.h>
> > +
> > +static struct lp8720_info lp8720_info;
> > +
> > +static int lp8720_write(u8 reg, u8 val)
> > +{
> > +	return i2c_write(lp8720_info.chip_idsel, reg, 1, &val, 1);
> > +}
> > +
> > +static int lp8720_read(u8 reg, u8 *val)
> > +{
> > +	return i2c_read(lp8720_info.chip_idsel, reg, 1, val, 1);
> > +}
> 
> Should I ifdef for I2C and GPIO support? It seems that GPIO support only
> has board-sepcific config options, so this may be hard. There is
> CONFIG_DM_GPIO for driver model, but it is apparently not always used,
> especially not on SPL.

Don't code for what you can't test.  Which way are you using this on the
Optimus?  And in general, any comments here Przemyslaw?  Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20141104/7e48030e/attachment.pgp>

  reply	other threads:[~2014-11-04 15:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 17:32 [U-Boot] [PATCH] power: LP8720 regulator support Paul Kocialkowski
2014-11-01 11:01 ` Paul Kocialkowski
2014-11-04 15:58   ` Tom Rini [this message]
2014-11-04 17:46     ` Przemyslaw Marczak
2014-11-05 17:44       ` Paul Kocialkowski
2014-11-04 17:46   ` Przemyslaw Marczak

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=20141104155806.GL15133@bill-the-cat \
    --to=trini@ti.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 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.