summaryrefslogtreecommitdiff
path: root/board/jacuzzi
diff options
context:
space:
mode:
authorIkjoon Jang <ikjn@chromium.org>2020-06-17 13:56:48 +0800
committerCommit Bot <commit-bot@chromium.org>2020-06-19 10:33:44 +0000
commit4df277da323b87bebb27209971670e6862d6f435 (patch)
tree6d6fa0dc76decb34530d754d4e81e48447dd51af /board/jacuzzi
parent46b89211e0480f7acf8d1cb832aac2e20827a48e (diff)
downloadchrome-ec-4df277da323b87bebb27209971670e6862d6f435.tar.gz
baseboard/kukui: Do not consider FET states in battery presence check
When Juniper is powered up with fully drained LGC battery, its FET states indicates battery is disconnected even it's still i2c responsive. In MT8183 platform, !battery_is_presence() isn't blocking power on, this function does not need to return BP_NO when battery is i2c responsive but DFET state is off. This patch fixes the problem of sbs-battery probe fail from host side when a device is powered up from external power source with fully drained battery reporting DFET state is off. BUG=b:153710351 TEST=none BRANCH=none Signed-off-by: Ikjoon Jang <ikjn@chromium.org> Change-Id: I67b750b7586fcad149c65e88e73dcbd872ca76bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2247972 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/jacuzzi')
-rw-r--r--board/jacuzzi/battery.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/board/jacuzzi/battery.c b/board/jacuzzi/battery.c
index 4f8ae97451..7fd56ea7a3 100644
--- a/board/jacuzzi/battery.c
+++ b/board/jacuzzi/battery.c
@@ -3,7 +3,6 @@
* found in the LICENSE file.
*/
-#include "baseboard/kukui/battery_smart.h"
#include "battery.h"
#include "battery_fuel_gauge.h"
#include "gpio.h"
@@ -100,51 +99,3 @@ enum battery_present battery_hw_present(void)
{
return gpio_get_level(GPIO_EC_BATT_PRES_ODL) ? BP_NO : BP_YES;
}
-
-/*
- * Physical detection of battery.
- */
-__override enum battery_present battery_check_present_status(void)
-{
- enum battery_present batt_pres = BP_NOT_SURE;
-
-#ifdef CONFIG_BATTERY_HW_PRESENT_CUSTOM
- /* Get the physical hardware status */
- batt_pres = battery_hw_present();
-#endif
-
- /*
- * If the battery is not physically connected, then no need to perform
- * any more checks.
- */
- if (batt_pres == BP_NO)
- return batt_pres;
-
- /*
- * If the battery is present now and was present last time we checked,
- * return early.
- */
- if (batt_pres == batt_pres_prev)
- return batt_pres;
-
- /*
- * Check battery disconnect status. If we are unable to read battery
- * disconnect status or DFET is off, then return BP_NOT_SURE. Battery
- * could be in ship mode and might require pre-charge current to wake
- * it up. BP_NO is not returned here because charger state machine
- * will not provide pre-charge current assuming that battery is not
- * present.
- */
- if (battery_get_disconnect_state() != BATTERY_NOT_DISCONNECTED)
- return BP_NOT_SURE;
-
- /*
- * Ensure that battery is:
- * 1. Not in cutoff
- */
- if (battery_is_cut_off() != BATTERY_CUTOFF_STATE_NORMAL)
- return BP_NO;
-
- return batt_pres;
-}
-