summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYilun Lin <yllin@google.com>2018-08-17 14:08:08 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-08-23 13:20:43 -0700
commitf4c3719fd8769c360d17846a554541adcaef5659 (patch)
tree1a1c11db445cd35e48a3acaf877f45a62f5b16a0
parentcac3f7c60f5a62ae3c696b02581e750c7dedb2fe (diff)
downloadchrome-ec-f4c3719fd8769c360d17846a554541adcaef5659.tar.gz
usb_pd_protocol: Correct pd command help.
After CL:1096654 merged, the command help should also be updated. TEST=make flash_ec BOARD=kukui; see pd's help message. BRANCH=None BUG=b:72557427 Change-Id: Id5eefbded520c906f79548171337b57ab16fe6d9 Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/1179489 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Yilun Lin <yllin@chromium.org> Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
-rw-r--r--common/usb_pd_protocol.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index e165523676..1de3a4a696 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -4312,11 +4312,26 @@ static int command_pd(int argc, char **argv)
return EC_SUCCESS;
}
DECLARE_CONSOLE_COMMAND(pd, command_pd,
- "dualrole|dump|rwhashtable"
- "|trysrc [0|1]\n\t<port> "
- "[tx|bist_rx|bist_tx|charger|clock|dev|disable|enable"
- "|soft|hash|hard|ping|state|swap [power|data]|"
- "vdm [ping | curr | vers]]",
+ "dump"
+#ifdef CONFIG_USB_PD_TRY_SRC
+ "|trysrc"
+#endif
+ " [0|1|2]"
+#ifdef CONFIG_CMD_PD_DEV_DUMP_INFO
+ "|rwhashtable"
+#endif
+ "\n\t<port> state"
+#ifdef CONFIG_USB_PD_DUAL_ROLE
+ "|tx|bist_rx|bist_tx|charger|dev"
+ "\n\t<port> disable|enable|soft|info|hard|ping"
+ "\n\t<port> dualrole [on|off|freeze|sink|source]"
+ "\n\t<port> swap [power|data|vconn]"
+ "\n\t<port> vdm [ping|curr|vers]"
+#ifdef CONFIG_CMD_PD_FLASH
+ "\n\t<port> flash [erase|reboot|signature|info|version]"
+#endif /* CONFIG_CMD_PD_FLASH */
+#endif /* CONFIG_USB_PD_DUAL_ROLE */
+ ,
"USB PD");
#ifdef HAS_TASK_HOSTCMD