diff options
author | Todd Broch <tbroch@chromium.org> | 2015-01-05 12:42:17 -0800 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-01-06 04:46:01 +0000 |
commit | 2b364421a428ba3c1afdf193498697f7e4267fae (patch) | |
tree | 11262588273346d42ee7e2b434cd9f55c71e4ff2 | |
parent | efb28cc783b116d393a939cdd34d69557c29dd22 (diff) | |
download | chrome-ec-2b364421a428ba3c1afdf193498697f7e4267fae.tar.gz |
pd: Add CONFIG_CMD_TYPEC to optionally remove 'typec' console command.
Create optional config to remove 'typec' command for flash savings.
While its a useful command to many developers its not used in any
factory flows and costs ~500bytes of flash space.
Signed-off-by: Todd Broch <tbroch@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:34489
TEST=manual, compiles and command still there. If #undef saves ~500bytes.
Change-Id: I02c0ec1dd503b02f86d8ac3d5e99ed6ad493c95c
Reviewed-on: https://chromium-review.googlesource.com/238462
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
-rw-r--r-- | common/usb_pd_protocol.c | 2 | ||||
-rw-r--r-- | include/config.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c index 5cb33b1b82..b60113a3a5 100644 --- a/common/usb_pd_protocol.c +++ b/common/usb_pd_protocol.c @@ -2803,6 +2803,7 @@ DECLARE_CONSOLE_COMMAND(pd, command_pd, NULL); #ifdef CONFIG_USBC_SS_MUX +#ifdef CONFIG_CMD_TYPEC static int command_typec(int argc, char **argv) { const char * const mux_name[] = {"none", "usb", "dp", "dock"}; @@ -2844,6 +2845,7 @@ DECLARE_CONSOLE_COMMAND(typec, command_typec, "<port> [none|usb|dp|dock]", "Control type-C connector muxing", NULL); +#endif /* CONFIG_CMD_TYPEC */ #endif /* CONFIG_USBC_SS_MUX */ static int hc_pd_ports(struct host_cmd_handler_args *args) diff --git a/include/config.h b/include/config.h index ffa46704c4..118d0fe74f 100644 --- a/include/config.h +++ b/include/config.h @@ -345,6 +345,7 @@ #undef CONFIG_CMD_SPI_FLASH #undef CONFIG_CMD_STACKOVERFLOW #undef CONFIG_CMD_TASKREADY +#define CONFIG_CMD_TYPEC #undef CONFIG_CMD_USB_PD_PE /*****************************************************************************/ |