summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2014-08-27 17:46:13 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-28 06:59:49 +0000
commit9d0bb00192d460ef0a445040bf245a4840d38fbb (patch)
treebf30bf35bc5a25e329fe0a50e22af763d4da2b0b
parent2fd4b9c5719506793830f8b601bfc893edae1b03 (diff)
downloadchrome-ec-9d0bb00192d460ef0a445040bf245a4840d38fbb.tar.gz
host_command_pd: Fix condition for sending a PD MCU host event
PD_STATUS_HOST_EVENT is a non-zero bitmask, so use '&' to check the proper bit(s) in the condition. BUG=chrome-os-partner:31361 TEST=Manual on Samus. Plug + unplug zinger, verify that host events are not set. Also, verify that 'pdevent' console command still sets the host event. BRANCH=None. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: I15c61c3c872ce8e7425678b2c669fcfa1eec89a6 Reviewed-on: https://chromium-review.googlesource.com/214631 Reviewed-by: Alec Berg <alecaberg@chromium.org>
-rw-r--r--common/host_command_pd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/host_command_pd.c b/common/host_command_pd.c
index 467dc07dd7..ecd5e07cf5 100644
--- a/common/host_command_pd.c
+++ b/common/host_command_pd.c
@@ -56,7 +56,7 @@ static void pd_exchange_status(void)
CPRINTS("Failed to set input current limit from PD MCU");
/* If PD is signalling host event, then pass it up to AP */
- if (pd_status.status | PD_STATUS_HOST_EVENT)
+ if (pd_status.status & PD_STATUS_HOST_EVENT)
host_set_single_event(EC_HOST_EVENT_PD_MCU);
}