From 7947687f12b2e802b2ef8cb13f9688ee7c10b746 Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 9 Aug 2017 18:33:50 -0700 Subject: [PATCH] poppy: Fix manufacturer access and shutdown data for poppy battery Poppy uses 0x00 reg for manufacturer access and shutdown data 0x10 just like Soraka battery. Fix the macros for poppy. BUG=b:64460667 BRANCH=None TEST=Verified that battery cutoff by smb command works on poppy. Change-Id: I5e568a31a575bc0e403362e48e64a753c094dab1 Signed-off-by: Furquan Shaikh Reviewed-on: https://chromium-review.googlesource.com/609553 Reviewed-by: Nicolas Boichat --- board/poppy/battery.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/board/poppy/battery.c b/board/poppy/battery.c index a984cdb698..6764ae53da 100644 --- a/board/poppy/battery.c +++ b/board/poppy/battery.c @@ -16,11 +16,11 @@ static enum battery_present batt_pres_prev = BP_NOT_SURE; -#ifdef BOARD_SORAKA /* Shutdown mode parameter to write to manufacturer access register */ #define SB_SHIP_MODE_REG SB_MANUFACTURER_ACCESS #define SB_SHUTDOWN_DATA 0x0010 +#ifdef BOARD_SORAKA static const struct battery_info info = { .voltage_max = 8800, .voltage_normal = 7700, @@ -36,9 +36,6 @@ static const struct battery_info info = { .discharging_max_c = 60, }; #elif defined(BOARD_POPPY) -/* Shutdown mode parameter to write to manufacturer access register */ -#define SB_SHIP_MODE_REG 0x3a -#define SB_SHUTDOWN_DATA 0xC574 static const struct battery_info info = { .voltage_max = 13200,