From 4a1883651f7e54ad5589ee98c17133fb07247c6f Mon Sep 17 00:00:00 2001
From: Przemyslaw Marczak
Date: Tue, 10 Jun 2014 16:55:08 +0200
Subject: [PATCH] trats/trats2: exynos_power_init: return 0 if no battery
detected.
Generic board support is now enabled for Exynos 4, and if any
init function returns an error then the init process is stopped.
This makes a boot issue on the Trats and Trats2 devices. If the device
is supplied by USB cable or an external power supply then it can't boot
because function exynos_power_init returns an error. Now this function
returns 0 if battery is not connected.
Signed-off-by: Przemyslaw Marczak
Cc: Lukasz Majewski
Cc: Piotr Wilczek
Cc: Minkyu Kang
Signed-off-by: Minkyu Kang
---
board/samsung/trats/trats.c | 2 +-
board/samsung/trats2/trats2.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c
index fec72d4c54..3dd340b7d8 100644
--- a/board/samsung/trats/trats.c
+++ b/board/samsung/trats/trats.c
@@ -332,7 +332,7 @@ int exynos_power_init(void)
if (!p_chrg->chrg->chrg_bat_present(p_chrg)) {
puts("No battery detected\n");
- return -1;
+ return 0;
}
p_fg->fg->fg_battery_check(p_fg, p_bat);
diff --git a/board/samsung/trats2/trats2.c b/board/samsung/trats2/trats2.c
index e4987ce8b4..fa26e61244 100644
--- a/board/samsung/trats2/trats2.c
+++ b/board/samsung/trats2/trats2.c
@@ -214,7 +214,7 @@ int exynos_power_init(void)
if (!p_chrg->chrg->chrg_bat_present(p_chrg)) {
puts("No battery detected\n");
- return -1;
+ return 0;
}
p_fg->fg->fg_battery_check(p_fg, p_bat);
--
2.25.1