summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/reef/battery.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/board/reef/battery.c b/board/reef/battery.c
index df7d70d642..dc7b40b056 100644
--- a/board/reef/battery.c
+++ b/board/reef/battery.c
@@ -19,6 +19,8 @@
#include "i2c.h"
#include "util.h"
+#define CPRINTS(format, args...) cprints(CC_CHARGER, format, ## args)
+
enum battery_type {
BATTERY_SONY_CORP,
BATTERY_SMP_COS4870,
@@ -306,7 +308,10 @@ static int board_get_battery_type(void)
*/
static void board_init_battery_type(void)
{
- board_get_battery_type();
+ if (board_get_battery_type() != BATTERY_TYPE_COUNT)
+ CPRINTS("found batt:%s", info[board_battery_type].manuf_name);
+ else
+ CPRINTS("battery not found");
}
DECLARE_HOOK(HOOK_INIT, board_init_battery_type, HOOK_PRIO_INIT_I2C + 1);