summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijay Hiremath <vijay.p.hiremath@intel.com>2017-01-18 19:18:02 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-19 02:43:04 -0800
commit056429f1210dba694e138555e28385af46127679 (patch)
tree129137b4e98e75c8160b588e02384d1278fc8768
parent144615c19cb1858eec868a44ab3c80c60dc331d9 (diff)
downloadchrome-ec-056429f1210dba694e138555e28385af46127679.tar.gz
reef: Remove battery revive code
Reef has custom battery present defined which can give the correct battery status depending on the battery initialization status hence removed the battery revive code. BUG=chrome-os-partner:61274 BRANCH=reef TEST=Battery can boot from cut-off mode. Change-Id: I9744b137c6443e85d1897ef61f5429fad15cc81b Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/430237 Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com> Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Shawn N <shawnn@chromium.org>
-rw-r--r--board/reef/battery.c48
-rw-r--r--board/reef/board.h1
2 files changed, 0 insertions, 49 deletions
diff --git a/board/reef/battery.c b/board/reef/battery.c
index f2e630fe7b..09f22a1816 100644
--- a/board/reef/battery.c
+++ b/board/reef/battery.c
@@ -531,54 +531,6 @@ int board_cut_off_battery(void)
ship_mode_inf->ship_mode_data);
}
-enum battery_disconnect_state battery_get_disconnect_state(void)
-{
- uint8_t data[6];
- int rv;
-
- /*
- * Take note if we find that the battery isn't in disconnect state,
- * and always return NOT_DISCONNECTED without probing the battery.
- * This assumes the battery will not go to disconnect state during
- * runtime.
- */
- static int not_disconnected;
-
- if (not_disconnected)
- return BATTERY_NOT_DISCONNECTED;
-
- if (extpower_is_present()) {
- /* Check if battery charging + discharging is disabled. */
- rv = sb_read_mfgacc(PARAM_OPERATION_STATUS,
- SB_ALT_MANUFACTURER_ACCESS, data, sizeof(data));
- if (rv)
- return BATTERY_DISCONNECT_ERROR;
- if (~data[3] & (BATTERY_DISCHARGING_DISABLED |
- BATTERY_CHARGING_DISABLED)) {
- not_disconnected = 1;
- return BATTERY_NOT_DISCONNECTED;
- }
-
- /*
- * Battery is neither charging nor discharging. Verify that
- * we didn't enter this state due to a safety fault.
- */
- rv = sb_read_mfgacc(PARAM_SAFETY_STATUS,
- SB_ALT_MANUFACTURER_ACCESS, data, sizeof(data));
- if (rv || data[2] || data[3] || data[4] || data[5])
- return BATTERY_DISCONNECT_ERROR;
-
- /*
- * Battery is present and also the status is initialized and
- * no safety fault, battery is disconnected.
- */
- if (battery_is_present() == BP_YES)
- return BATTERY_DISCONNECTED;
- }
- not_disconnected = 1;
- return BATTERY_NOT_DISCONNECTED;
-}
-
static int charger_should_discharge_on_ac(struct charge_state_data *curr)
{
/* can not discharge on AC without battery */
diff --git a/board/reef/board.h b/board/reef/board.h
index 87bd09f6f7..af68d69eb4 100644
--- a/board/reef/board.h
+++ b/board/reef/board.h
@@ -48,7 +48,6 @@
#define CONFIG_BATTERY_DEVICE_CHEMISTRY "LION"
#define CONFIG_BATTERY_CUT_OFF
#define CONFIG_BATTERY_PRESENT_CUSTOM
-#define CONFIG_BATTERY_REVIVE_DISCONNECT
#define CONFIG_BATTERY_SMART
/* Charger */