summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2017-12-20 10:03:18 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-01-05 05:43:19 -0800
commitca7bf51513a2ae5cdaf755f2a89e4f14b182d86c (patch)
treefd6d7656166639f0c19ea9f6bd3bab3073687f91
parent9de2d245cf0168131ddc8fda284e8ee169012fa3 (diff)
downloadchrome-ec-ca7bf51513a2ae5cdaf755f2a89e4f14b182d86c.tar.gz
poppy/soraka: Remove charger profile override functions
The battery gas gauge is configured properly, and we do not need these hacks. BRANCH=none BUG=b:70816727 TEST=On soraka, check that we can recover from dead battery TEST=On soraka, check that we can recover from battery cut-off (both HW and SW) TEST=Check that battery stops requesting power when over or under set temperature (done by ODM/battery vendor, see bug) Change-Id: I0b9d605632d86a3c39d07676d62374602ba068b4 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/835728 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r--board/poppy/battery.c42
-rw-r--r--board/poppy/board.h1
2 files changed, 0 insertions, 43 deletions
diff --git a/board/poppy/battery.c b/board/poppy/battery.c
index f35aa25348..30c89c24df 100644
--- a/board/poppy/battery.c
+++ b/board/poppy/battery.c
@@ -76,48 +76,6 @@ int board_cut_off_battery(void)
return sb_write(SB_SHIP_MODE_REG, SB_SHUTDOWN_DATA);
}
-int charger_profile_override(struct charge_state_data *curr)
-{
- const struct battery_info *batt_info;
- int bat_temp_c;
-
- batt_info = battery_get_info();
-
- if ((curr->batt.flags & BATT_FLAG_BAD_ANY) == BATT_FLAG_BAD_ANY) {
- curr->requested_current = batt_info->precharge_current;
- curr->requested_voltage = batt_info->voltage_max;
- return 1000;
- }
-
- /* battery temp in 0.1 deg C */
- bat_temp_c = curr->batt.temperature - 2731;
-
- /* Don't charge if outside of allowable temperature range */
- if (bat_temp_c >= batt_info->charging_max_c * 10 ||
- bat_temp_c < batt_info->charging_min_c * 10) {
- curr->requested_current = 0;
- curr->requested_voltage = 0;
- curr->batt.flags &= ~BATT_FLAG_WANT_CHARGE;
- curr->state = ST_IDLE;
- }
- return 0;
-}
-
-/* Customs options controllable by host command. */
-#define PARAM_FASTCHARGE (CS_PARAM_CUSTOM_PROFILE_MIN + 0)
-
-enum ec_status charger_profile_override_get_param(uint32_t param,
- uint32_t *value)
-{
- return EC_RES_INVALID_PARAM;
-}
-
-enum ec_status charger_profile_override_set_param(uint32_t param,
- uint32_t value)
-{
- return EC_RES_INVALID_PARAM;
-}
-
enum battery_present battery_hw_present(void)
{
/* The GPIO is low when the battery is physically present */
diff --git a/board/poppy/board.h b/board/poppy/board.h
index 882b70391c..083f764c17 100644
--- a/board/poppy/board.h
+++ b/board/poppy/board.h
@@ -84,7 +84,6 @@
#define CONFIG_CHARGER_INPUT_CURRENT 512
#define CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON 2
#define CONFIG_CHARGER_NARROW_VDC
-#define CONFIG_CHARGER_PROFILE_OVERRIDE
#define CONFIG_CHARGER_PSYS
#define CONFIG_CHARGER_SENSE_RESISTOR 10
#define CONFIG_CHARGER_SENSE_RESISTOR_AC 20