diff options
author | Alec Berg <alecaberg@chromium.org> | 2015-05-11 17:31:16 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-05-27 02:39:41 +0000 |
commit | 5b5f737d8f6f1be15d4ab5f42f290d20576307c4 (patch) | |
tree | be384973f533436d9a53c46b742be35f5b377a4f /common/pd_log.c | |
parent | 25ce43fc3d35669500d74e44f3b7c96302ee2ade (diff) | |
download | chrome-ec-5b5f737d8f6f1be15d4ab5f42f290d20576307c4.tar.gz |
pd: move non-phy layer config out of usb_pd_config.h
Move parts of usb_pd_config.h that are not part of the phy layer
out of usb_pd_config.h and into board.h. This cleans up the
division between the TCPC and TCPM as only the TCPC needs to
use usb_pd_config.h.
Also cleans up the use of the CC detection voltage thresholds
by creating standard macros to use based on Rp strength for the
board.
BUG=none
BRANCH=none
TEST=make -j buildall
Change-Id: I946cceb38bea8233095b8a4b287102bb8a3a296d
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/270337
Reviewed-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'common/pd_log.c')
-rw-r--r-- | common/pd_log.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/common/pd_log.c b/common/pd_log.c index 96d55f9330..333a22b7bb 100644 --- a/common/pd_log.c +++ b/common/pd_log.c @@ -10,9 +10,6 @@ #include "task.h" #include "timer.h" #include "usb_pd.h" -#ifdef HAS_TASK_HOSTCMD -#include "usb_pd_config.h" -#endif #include "util.h" /* Event log FIFO */ @@ -176,7 +173,7 @@ dequeue_retry: if (r->type == PD_EVENT_NO_ENTRY) { int i, res; incoming_logs = 0; - for (i = 0; i < PD_PORT_COUNT; ++i) { + for (i = 0; i < CONFIG_USB_PD_PORT_COUNT; ++i) { /* only accessories who knows Google logging format */ if (pd_get_identity_vid(i) != USB_VID_GOOGLE) continue; @@ -204,7 +201,7 @@ static int hc_pd_write_log_entry(struct host_cmd_handler_args *args) if (type < PD_EVENT_MCU_BASE || type >= PD_EVENT_ACC_BASE) return EC_RES_INVALID_PARAM; - if (port > 0 && port >= PD_PORT_COUNT) + if (port > 0 && port >= CONFIG_USB_PD_PORT_COUNT) return EC_RES_INVALID_PARAM; switch (type) { |