Skip to contentSkip to conversation

trats/trats2: exynos_power_init: return 0 if no battery detected.

PATCH New Przemyslaw Marczak 2 participants 2 messages Jun 10, 2014 – Jun 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Cc Lukasz Majewski <[email protected]>
Cc Piotr Wilczek <[email protected]>
Cc Minkyu Kang <[email protected]>
---
 board/samsung/trats/trats.c   | 2 +-
 board/samsung/trats2/trats2.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
board/samsung/trats/trats.c +1 -1
index fec72d4..3dd340b 100644
@@ -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);
board/samsung/trats2/trats2.c +1 -1
index e4987ce..fa26e61 100644
@@ -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);
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 trats/trats2: exynos_power_init: return 0 if no battery detected.

Quoted 8 lines · Przemyslaw Marczak

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.

Quoted 9 lines
Cc Lukasz Majewski <[email protected]>
Cc Piotr Wilczek <[email protected]>
Cc Minkyu Kang <[email protected]>
---
 board/samsung/trats/trats.c   | 2 +-
 board/samsung/trats2/trats2.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

applied to u-boot-samsung.

Thanks,
Minkyu Kang.