summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-10-24 09:18:47 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-25 01:32:41 +0000
commit5e19f9c5d529bde4377842fc27d4d86e0b83dcf1 (patch)
treea100e49cff09207b881eb6a6d57ca7c863299345
parent55abd0b93cdadc717175ce9dbe732576ff36986f (diff)
downloadchrome-ec-5e19f9c5d529bde4377842fc27d4d86e0b83dcf1.tar.gz
cleanup: Comments in console_output.c
No code changes, just tidying some comments and moving a TODO to a bug. BUG=chrome-os-partner:23557 BRANCH=none TEST=compile any project; hey, this is just a change in comments. Change-Id: Ib1e3190ac9abdc90fb04c785e1f20b9cc66b1bc3 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174447 Reviewed-by: Alec Berg <alecaberg@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--common/console_output.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/common/console_output.c b/common/console_output.c
index bad734d67a..994e954e0d 100644
--- a/common/console_output.c
+++ b/common/console_output.c
@@ -16,8 +16,20 @@
static uint32_t channel_mask = CC_DEFAULT;
static uint32_t channel_mask_saved = CC_DEFAULT;
-/* List of channel names; must match enum console_channel. */
-/* TODO: move this to board.c */
+/*
+ * List of channel names; must match enum console_channel.
+ *
+ * We could do something fancy and macro-y with this like ec.tasklist, so that
+ * the channel name list and console_channel enum come from the same header
+ * file. That's clever, but I'm not convinced it's more readable or
+ * maintainable than the two simple lists we have now.
+ *
+ * We could also try to get clever with #ifdefs or board-specific lists of
+ * channel names, so that for example boards without port80 support don't waste
+ * binary size on the channel name string for "port80". Pruning the channel
+ * list might also become more important if we have >32 channels - for example,
+ * if we decide to replace enum console_channel with enum module_id.
+ */
static const char * const channel_names[] = {
"command",
"charger",
@@ -104,8 +116,6 @@ static int command_ch(int argc, char **argv)
/* No disabling the command output channel */
channel_mask = m | CC_MASK(CC_COMMAND);
- /* TODO: save channel list to EEPROM */
-
return EC_SUCCESS;
}
}