public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] power: LP8720 regulator support
Date: Tue, 04 Nov 2014 18:46:03 +0100	[thread overview]
Message-ID: <545910DB.1040205@samsung.com> (raw)
In-Reply-To: <20141104155806.GL15133@bill-the-cat>

Hello,

On 11/04/2014 04:58 PM, Tom Rini wrote:
> 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!
>
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

Thanks for cc Tom, I have some comments in a next message.

Paul,
there are no patches for the board, which you mentioned about. Usually 
we don't add dead code to U-Boot. If you are going to add new board - 
just add it with all required drivers in a one patchset - then it is 
consistent and easy to review.

Best regards,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

  reply	other threads:[~2014-11-04 17:46 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
2014-11-04 17:46     ` Przemyslaw Marczak [this message]
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=545910DB.1040205@samsung.com \
    --to=p.marczak@samsung.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