From c126e8760167eea2ee1e10fd8e63a680b5b8e8c8 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Fri, 8 Jul 2016 14:11:56 +0800 Subject: UPSTREAM: Add CONFIG_HOSTCMD_DEBUG_MODE to set default hcdebug mode elm EC console output is very spammy, as EC_CMD_MOTION_SENSE_CMD is called every 100ms, so we want to set "hcdebug" to "off" as the default (which still includes errors, but no "normal" commands). BRANCH=cyan BUG=chrome-os-partner:55001 TEST=make buildall -j TEST=Flash cyan EC, see that output is fairly quiet. Change-Id: I70d91c291d934b4f032e5c57f3c333e2c10b93bc Reviewed-on: https://chromium-review.googlesource.com/359412 Reviewed-by: Gwendal Grignou Tested-by: Gwendal Grignou Commit-Queue: Gwendal Grignou --- common/host_command.c | 2 +- include/config.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/host_command.c b/common/host_command.c index 387f0d03a2..61d8b85b66 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -47,7 +47,7 @@ static enum { /* Number of host command debug modes */ HCDEBUG_MODES -} hcdebug = HCDEBUG_NORMAL; +} hcdebug = CONFIG_HOSTCMD_DEBUG_MODE; static const char * const hcdebug_mode_names[HCDEBUG_MODES] = { "off", "normal", "every", "params"}; diff --git a/include/config.h b/include/config.h index 4fbe6fd403..fa845b1dc2 100644 --- a/include/config.h +++ b/include/config.h @@ -889,6 +889,9 @@ */ #undef CONFIG_HOST_COMMAND_STATUS +/* Default hcdebug mode, e.g. HCDEBUG_OFF or HCDEBUG_NORMAL */ +#define CONFIG_HOSTCMD_DEBUG_MODE HCDEBUG_NORMAL + /* If we have host command task, assume we also are using host events. */ #ifdef HAS_TASK_HOSTCMD #define CONFIG_HOSTCMD_EVENTS -- cgit v1.2.1