Patchwork [U-Boot,v5,17/26] arm:trats:pmic: Enable battery support at Samsung's TRATS board

login
register
mail settings
Submitter Łukasz Majewski
Date Nov. 5, 2012, 5:28 p.m.
Message ID <1352136508-14198-18-git-send-email-l.majewski@samsung.com>
Download mbox | patch
Permalink /patch/197241/
State Superseded
Delegated to: Minkyu Kang
Headers show

Comments

Łukasz Majewski - Nov. 5, 2012, 5:28 p.m.
Support for TRATS battery has been added. It is treated as a "normal"
power related device and thereof controlled by pmic/power subsystem.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
Changes for v2:
- New patch for v2.
Changes for v3:
- None
Changes for v4:
- None
Changes for v5:
- None
---
 board/samsung/trats/trats.c |    2 ++
 include/configs/trats.h     |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
Minkyu Kang - Nov. 8, 2012, 10:14 a.m.
On 06/11/12 02:28, Lukasz Majewski wrote:
> Support for TRATS battery has been added. It is treated as a "normal"
> power related device and thereof controlled by pmic/power subsystem.
> 
> Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Minkyu Kang <mk7.kang@samsung.com>
> ---
> Changes for v2:
> - New patch for v2.
> Changes for v3:
> - None
> Changes for v4:
> - None
> Changes for v5:
> - None
> ---
>  board/samsung/trats/trats.c |    2 ++
>  include/configs/trats.h     |    2 ++
>  2 files changed, 4 insertions(+), 0 deletions(-)
> 

Acked-by: Minkyu Kang <mk7.kang@samsung.com>

Thanks.
Minkyu Kang.

Patch

diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index c0a7b90..5c23744 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -39,6 +39,7 @@ 
 #include <power/max8997_pmic.h>
 #include <libtizen.h>
 #include <power/max8997_muic.h>
+#include <power/battery.h>
 #include <power/max17042_fg.h>
 
 #include "setup.h"
@@ -244,6 +245,7 @@  int power_init_board(void)
 	pmic_init_max8997();
 	power_fg_init(I2C_9);
 	power_muic_init(I2C_5);
+	power_bat_init(0);
 	return 0;
 }
 
diff --git a/include/configs/trats.h b/include/configs/trats.h
index 0bc1f3a..2fdc597 100644
--- a/include/configs/trats.h
+++ b/include/configs/trats.h
@@ -242,6 +242,8 @@ 
 #define CONFIG_POWER_FG_MAX17042
 #define CONFIG_POWER_MUIC
 #define CONFIG_POWER_MUIC_MAX8997
+#define CONFIG_POWER_BATTERY
+#define CONFIG_POWER_BATTERY_TRATS
 #define CONFIG_USB_GADGET
 #define CONFIG_USB_GADGET_S3C_UDC_OTG
 #define CONFIG_USB_GADGET_DUALSPEED