
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@samsung.com] Sent: Friday, August 30, 2013 6:39 AM To: Piotr Wilczek Cc: u-boot@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.