summaryrefslogtreecommitdiff
path: root/board/samus/extpower.c
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-07-01 11:37:04 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-11 01:55:13 +0000
commit6ab38d8715bb49753b98b21f5430c6986dc12cf2 (patch)
treea5849e121cb2a410bc10d94eb3d0d75083e0a6a4 /board/samus/extpower.c
parentbc4973c1f9a49d8ce17b42a74e7373f2a8e8ca09 (diff)
downloadchrome-ec-6ab38d8715bb49753b98b21f5430c6986dc12cf2.tar.gz
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 <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/206598 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board/samus/extpower.c')
-rw-r--r--board/samus/extpower.c11
1 files changed, 1 insertions, 10 deletions
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);
}
/**