summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-12-18 15:47:52 -0800
committerGerrit <chrome-bot@google.com>2012-12-18 18:18:19 -0800
commit7326b7475a59817b1fc413ac285bae2b294a986e (patch)
treecb8fbaafe80b46bcdf273db6ddef108e9eec8464
parenteb6e08570a46fe641308ff696225acfa1643a5a8 (diff)
downloadchrome-ec-7326b7475a59817b1fc413ac285bae2b294a986e.tar.gz
Tidy ACPI debug output
The host does a lot of ACPI keyboard backlight writes, which were scrolling the debug console output. Change to using CR instead of LF, so it's not so distracting. (No code changes other than debug output) BUG=none BRANCH=none TEST=Move laptop through different ambient light settings and look at console output as keyboard backlight ramps up and down. The 'ACPI kblight' messages shouldn't cause piles of scrolling. Change-Id: Iafde57ffe6090830fa54d4920c48b198c36d8d85 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/39914 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r--chip/lm4/lpc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c
index 8b8f0a2740..b082e53fc3 100644
--- a/chip/lm4/lpc.c
+++ b/chip/lm4/lpc.c
@@ -395,17 +395,25 @@ static void handle_acpi_write(int is_cmd)
} else if (acpi_cmd == EC_CMD_ACPI_WRITE && acpi_data_count == 2) {
/* ACPI write cmd + addr + data */
- CPRINTF("[%T ACPI write 0x%02x = 0x%02x]\n", acpi_addr, data);
switch (acpi_addr) {
case EC_ACPI_MEM_TEST:
+ CPRINTF("[%T ACPI mem test 0x%02x]\n", data);
acpi_mem_test = data;
break;
#ifdef CONFIG_PWM
case EC_ACPI_MEM_KEYBOARD_BACKLIGHT:
+ /*
+ * Debug output with CR not newline, because the host
+ * does a lot of keyboard backlights and it scrolls the
+ * debug console.
+ */
+ CPRINTF("\r[%T ACPI kblight %d]", data);
pwm_set_keyboard_backlight(data);
break;
#endif
default:
+ CPRINTF("[%T ACPI write 0x%02x = 0x%02x]\n",
+ acpi_addr, data);
break;
}