public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] trats/trats2: exynos_power_init: return 0 if no battery detected.
@ 2014-06-10 14:55 Przemyslaw Marczak
  2014-06-19  0:41 ` Minkyu Kang
  0 siblings, 1 reply; 2+ messages in thread
From: Przemyslaw Marczak @ 2014-06-10 14:55 UTC (permalink / raw)
  To: u-boot

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 <p.marczak@samsung.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: Piotr Wilczek <p.wilczek@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
---
 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 fec72d4..3dd340b 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 e4987ce..fa26e61 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);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-19  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-10 14:55 [U-Boot] [PATCH] trats/trats2: exynos_power_init: return 0 if no battery detected Przemyslaw Marczak
2014-06-19  0:41 ` Minkyu Kang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox