summaryrefslogtreecommitdiff
path: root/test/test_config.h
diff options
context:
space:
mode:
authorSam Hurst <shurst@google.com>2017-01-10 09:55:37 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-01-26 18:43:52 -0800
commit17515de32c7dffc5a9afd7e365a4dd31b3d3074a (patch)
tree5957d718301b4c0377906cc3f4a49a501785b918 /test/test_config.h
parent7736c887d786c8ee2374dcc2b7fe4a4fc066c9bb (diff)
downloadchrome-ec-17515de32c7dffc5a9afd7e365a4dd31b3d3074a.tar.gz
pd: support gotoMin and giveBack
In Sink mode, on the receipt of a GotoMin message, reduce the current consumption to some minimum level. BUG=chrome-os-partner:33688 TEST=Manual testing Used a Kevin, with test routine, to test GotoMin feature on another Kevin unit. Test routine: if (!strcasecmp(argv[2], "gm")) { ccprintf("send goto min\n"); send_control(port, PD_CTRL_GOTO_MIN); send_control(port, PD_CTRL_PS_RDY); } Kevin with GotoMin feature: # ectool usbpdpower 0 Port 0: SNK DRP PD 4277mV / 3000mA, max 5000mV / 3000mA / 15000mW Port 1: Disconnected After Test routine is executed: # ectool usbpdpower 0 Port 0: SNK DRP PD 4906mV / 500mA, max 5000mV / 500mA / 2500mW Port 1: Disconnected BRANCH=none Change-Id: Iaac6e19706ceb10ccaff4d602d63fc086c808c8f Reviewed-on: https://chromium-review.googlesource.com/425728 Commit-Ready: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'test/test_config.h')
-rw-r--r--test/test_config.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/test_config.h b/test/test_config.h
index d2438c9612..fcad730c7f 100644
--- a/test/test_config.h
+++ b/test/test_config.h
@@ -141,7 +141,7 @@ int ncp15wb_calculate_temp(uint16_t adc);
#define CONFIG_ALS_LIGHTBAR_DIMMING 0
#endif
-#ifdef TEST_USB_PD
+#if defined(TEST_USB_PD) || defined(TEST_USB_PD_GIVEBACK)
#define CONFIG_USB_POWER_DELIVERY
#define CONFIG_USB_PD_CUSTOM_VDM
#define CONFIG_USB_PD_DUAL_ROLE
@@ -150,7 +150,10 @@ int ncp15wb_calculate_temp(uint16_t adc);
#define CONFIG_USB_PD_TCPM_STUB
#define CONFIG_SHA256
#define CONFIG_SW_CRC
+#ifdef TEST_USB_PD_GIVEBACK
+#define CONFIG_USB_PD_GIVE_BACK
#endif
+#endif /* TEST_USB_PD || TEST_USB_PD_GIVEBACK */
#ifdef TEST_CHARGE_MANAGER
#define CONFIG_CHARGE_MANAGER