public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V4 1/3] power:battery: add battery support for Trats2 board
Date: Wed, 11 Sep 2013 12:48:29 +0200	[thread overview]
Message-ID: <20130911124829.01f4ec64@amdc308.digital.local> (raw)
In-Reply-To: <5230215D.60009@samsung.com>

Hi Minkyu,

> Dear Piotr Wilczek,
> 
> On 30/08/13 15:00, Piotr Wilczek wrote:
> > Dear Minkyu Kang,
> > 
> >> -----Original Message-----
> >> From: Minkyu Kang [mailto:mk7.kang at samsung.com]
> >> Sent: Friday, August 30, 2013 6:39 AM
> >> To: Piotr Wilczek
> >> Cc: u-boot at lists.denx.de; Kyungmin Park; Lukasz Majewski
> >> Subject: Re: [PATCH V4 1/3] power:battery: add battery support for
> >> Trats2 board
> >>
> >> Dear Piotr Wilczek,
> >>
> >> On 29/08/13 17:49, Piotr Wilczek wrote:
> >>> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
> >>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> >>> ---
> >>>  drivers/power/battery/Makefile     |    1 +
> >>>  drivers/power/battery/bat_trats2.c |   65
> >> ++++++++++++++++++++++++++++++++++++
> >>>  2 files changed, 66 insertions(+)
> >>>  create mode 100644 drivers/power/battery/bat_trats2.c
> >>>
> >>
> >> bat_trats2.c is almost same with bat_trat.c I think, it can be
> >> reuse bat_trat.c Do you have special reason to add new file?
> > 
> > If several boards would use that file, any change to it will affect
> > all these boards. Also why it should be named 'bat_trats' then?
> 
> OK. I understood what you said.
> 
> But, I don't understand why this file (or directory - battery) is
> needed. It is not a driver,

In the pmic framework the battery is treated in the same way as MUIC,
PMIC, FG. This is the reason for separate directory.

> it just settings for specific board.
> If so, why don't you move to board file instead?


I would like to avoid code duplication.


> Do we need to make new files for every boards?

The problem here is with the way we are handling charging. Trats uses
the "busy loop" approach.
In the TRATS2 the busy loop is omitted, and only charging is enabled.

Those are two different approaches for handling charging (this may also
depend on PMIC capabilities).


> 
> Lukasz,
> how you think?

For the PMIC itself - it needs to be rewritten to be prepared for multi
board support for u-boot. It doesn't support it now (as Tom pointed
out recently).

Also - as shown with PMIC batteries - different charging "profiles" are
needed.

The bat_trats.c, bat_trats2.c [*] would be renamed to bat_profile1.c and
bat_profile2.c. Also some common code from [*] would be extracted.

Now it seems, that acceptance of Trats2 board depends on the
shortcoming in the PMIC framework.

My proposition - accept the Trats2 code (since it works and is tested).

The battery code is going to be cleaned up when we finish and post PMIC
framework rework.

I will post request for PMIC v3 requirements soon.

> 
> > 
> > Other reason is that I don't want to block command line while
> > charging battery as in 'bat_trats'.
> > 
> > Anyway it's not that important. I will modify it the way you prefer.
> > 
> > Best regards,
> > Piotr Wilczek
> > 
> >>
> >> Thanks,
> >> Minkyu Kang.
> > 
> > 
> > 
> 
> Thanks,
> Minkyu Kang.


-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

  reply	other threads:[~2013-09-11 10:48 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-24  8:23 [U-Boot] [PATCH V3 0/3] Introduce Samsung's new board Trats2 Piotr Wilczek
2013-05-24  8:23 ` [U-Boot] [PATCH V3 1/3] power:battery: add battery support for Trats2 board Piotr Wilczek
2013-05-24  8:23 ` [U-Boot] [PATCH V3 2/3] i2c:multi_i2c: add new macros I2C_7 and I2C_8 Piotr Wilczek
2013-05-24  8:23 ` [U-Boot] [PATCH V3 3/3] samsung: trats2: add support for new board Trats2 Piotr Wilczek
2013-06-18  7:00 ` [U-Boot] [PATCH V3 0/3] Introduce Samsung's " Jaehoon Chung
2013-06-20  4:07   ` Jaehoon Chung
2013-08-29  8:49 ` [U-Boot] [PATCH V4 " Piotr Wilczek
2013-08-29  8:49   ` [U-Boot] [PATCH V4 1/3] power:battery: add battery support for Trats2 board Piotr Wilczek
2013-08-30  4:39     ` Minkyu Kang
2013-08-30  6:00       ` Piotr Wilczek
2013-09-11  7:53         ` Minkyu Kang
2013-09-11 10:48           ` Lukasz Majewski [this message]
2013-09-17 13:25             ` Minkyu Kang
2013-09-11  6:22       ` Piotr Wilczek
2013-08-29  8:49   ` [U-Boot] [PATCH V4 2/3] samsung:common:i2c: add definions for third soft I2C adapter " Piotr Wilczek
2013-08-29  8:49   ` [U-Boot] [PATCH V4 3/3] samsung: trats2: add support for new board Trats2 Piotr Wilczek
2013-09-17 13:23     ` Minkyu Kang
2013-08-30  3:04   ` [U-Boot] [PATCH V4 0/3] Introduce Samsung's " Jaehoon Chung
2013-09-19  8:14 ` [U-Boot] [PATCH V5 " Piotr Wilczek
2013-09-19  8:14   ` [U-Boot] [PATCH V5 1/3] power:battery: add battery support for Trats2 board Piotr Wilczek
2013-09-19  8:14   ` [U-Boot] [PATCH V5 2/3] samsung:common:i2c: add definions for third soft I2C adapter " Piotr Wilczek
2013-09-19  8:14   ` [U-Boot] [PATCH V5 3/3] samsung: trats2: add support for new board Trats2 Piotr Wilczek
2013-09-20 13:01 ` [U-Boot] [PATCH V6 0/3] Introduce Samsung's " Piotr Wilczek
2013-09-20 13:01   ` [U-Boot] [PATCH V6 1/3] power:battery: add battery support for Trats2 board Piotr Wilczek
2013-09-20 13:01   ` [U-Boot] [PATCH V6 2/3] samsung:common:i2c: add definions for third soft I2C adapter " Piotr Wilczek
2013-09-20 13:01   ` [U-Boot] [PATCH V6 3/3] samsung: trats2: add support for new board Trats2 Piotr Wilczek
2013-09-25  2:18   ` [U-Boot] [PATCH V6 0/3] Introduce Samsung's " Minkyu Kang

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=20130911124829.01f4ec64@amdc308.digital.local \
    --to=l.majewski@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