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>
This commit is contained in:
Nicolas Boichat
2017-12-20 10:03:18 +08:00
committed by chrome-bot
parent 9de2d245cf
commit ca7bf51513
2 changed files with 0 additions and 43 deletions

View File

@@ -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 */

View File

@@ -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