diff options
author | Ting Shen <phoenixshen@chromium.org> | 2020-12-10 09:15:04 +0000 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-12-10 10:18:49 +0000 |
commit | e2e020123e1e9b71d40717030c50576fbf1f6207 (patch) | |
tree | 3e2576189bd4a5173515ce352b6c9d04a263f8ef /board/asurada | |
parent | bcdb3009b6c6442f68dc01c9594e0a16ce1ecf3b (diff) | |
download | chrome-ec-e2e020123e1e9b71d40717030c50576fbf1f6207.tar.gz |
Revert "asurada: set input voltage to 9V when S5 with full battery"
This reverts commit 92f55b092e0a8b00496db89e3d129932aae0525a.
Reason for revert: This breaks "pd X dev Y" console command
Original change's description:
> asurada: set input voltage to 9V when S5 with full battery
>
> The data in b:162467514#comment3 shows that 9V input has lowest
> power consumption in S5.
>
> This CL forces PD to select 9V when S5 with full battery.
>
> BUG=b:162467514
> TEST=Verify dut chooses 9V when in S5 and battery full, and
> chooses 15V in other states.
> BRANCH=none
>
> Signed-off-by: Ting Shen <phoenixshen@google.com>
> Change-Id: I36106f773ec4648bd0d9d5a75d75c8cbc7ee5c43
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2470378
> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
> Tested-by: Ting Shen <phoenixshen@chromium.org>
> Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Bug: b:162467514
Change-Id: I6941ccc4827bc9ab8a8eb167c5d88ebaf8686694
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2582434
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/asurada')
-rw-r--r-- | board/asurada/battery.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/board/asurada/battery.c b/board/asurada/battery.c index 1b694d9b3f..f8fc47034f 100644 --- a/board/asurada/battery.c +++ b/board/asurada/battery.c @@ -5,12 +5,7 @@ #include "battery.h" #include "battery_fuel_gauge.h" -#include "battery_smart.h" -#include "charge_manager.h" -#include "chipset.h" #include "gpio.h" -#include "hooks.h" -#include "usb_pd.h" const struct board_batt_params board_battery_info[] = { [BATTERY_C235] = { @@ -44,28 +39,3 @@ const struct board_batt_params board_battery_info[] = { BUILD_ASSERT(ARRAY_SIZE(board_battery_info) == BATTERY_TYPE_COUNT); const enum battery_type DEFAULT_BATTERY_TYPE = BATTERY_C235; - -static void reduce_input_voltage_when_full(void) -{ - struct batt_params batt; - int max_pd_voltage_mv; - int active_chg_port; - - active_chg_port = charge_manager_get_active_charge_port(); - if (active_chg_port == CHARGE_PORT_NONE) - return; - - battery_get_params(&batt); - /* Lower our input voltage to 9V when battery is full. */ - if (!(batt.flags & BATT_FLAG_BAD_STATUS) && - (batt.status & STATUS_FULLY_CHARGED) && - chipset_in_state(CHIPSET_STATE_ANY_OFF)) - max_pd_voltage_mv = 9000; - else - max_pd_voltage_mv = PD_MAX_VOLTAGE_MV; - - if (pd_get_max_voltage() != max_pd_voltage_mv) - pd_set_external_voltage_limit(active_chg_port, - max_pd_voltage_mv); -} -DECLARE_HOOK(HOOK_SECOND, reduce_input_voltage_when_full, HOOK_PRIO_DEFAULT); |