From 6ab38d8715bb49753b98b21f5430c6986dc12cf2 Mon Sep 17 00:00:00 2001 From: Alec Berg Date: Tue, 1 Jul 2014 11:37:04 -0700 Subject: samus: use real AC_PRESENT signal Revert - https://chromium-review.googlesource.com/#/c/205145/2 - https://chromium-review.googlesource.com/#/c/205147/4 Now using the real AC_PRESENT gpio signal instead of whether or not the PD MCU negotiated for 20V. BUG=chrome-os-partner:29841, chrome-os-partner:29842 BRANCH=none TEST=tested on a board with reworked AC_PRESENT signal. Verified that gpio is correctly reporting state of AC and is charging when AC is plugged in. Tested the no battery case to make sure board powers on and stays on with just a charger. Also tested the dead battery case by plugging in a dead battery, then plugging in a charger and making sure system powers on and starts charging. Change-Id: I4424771c91c8a2aa19eda68a8b5194e9265d529c Signed-off-by: Alec Berg Reviewed-on: https://chromium-review.googlesource.com/206598 Reviewed-by: Bill Richardson --- board/samus/extpower.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'board/samus') diff --git a/board/samus/extpower.c b/board/samus/extpower.c index c478d50ece..4da7e655a7 100644 --- a/board/samus/extpower.c +++ b/board/samus/extpower.c @@ -14,19 +14,10 @@ #include "gpio.h" #include "hooks.h" #include "host_command.h" -#include "system.h" -/* - * TODO(crosbug.com/p/29841): remove hack for getting extpower - * is present status from PD MCU. - */ -extern int pd_extpower_is_present(void); int extpower_is_present(void) { - if (system_get_board_version() <= BOARD_VERSION_PROTO_2_B) - return pd_extpower_is_present(); - else - return gpio_get_level(GPIO_AC_PRESENT); + return gpio_get_level(GPIO_AC_PRESENT); } /** -- cgit v1.2.1