summaryrefslogtreecommitdiff
path: root/common/host_command_pd.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 /common/host_command_pd.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 'common/host_command_pd.c')
-rw-r--r--common/host_command_pd.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index 27bc8265fa..ed9f97a21e 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -17,8 +17,6 @@
#define TASK_EVENT_EXCHANGE_PD_STATUS TASK_EVENT_CUSTOM(1)
-static int pd_charger_connected;
-
void host_command_pd_send_status(void)
{
task_set_event(TASK_ID_PDCMD, TASK_EVENT_EXCHANGE_PD_STATUS, 0);
@@ -50,22 +48,10 @@ static void pd_exchange_status(void)
task_wait_event(500*MSEC);
}
- if (rv >= 0)
- pd_charger_connected = pd_status.status &
- EC_CMD_PD_STATUS_FLAG_CHARGER_CONN;
- else
+ if (rv < 0)
CPRINTS("Host command to PD MCU failed");
}
-/*
- * TODO(crosbug.com/p/29841): remove hack for getting extpower
- * is present status from PD MCU.
- */
-int pd_extpower_is_present(void)
-{
- return pd_charger_connected;
-}
-
void pd_command_task(void)
{