From 7326b7475a59817b1fc413ac285bae2b294a986e Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Tue, 18 Dec 2012 15:47:52 -0800 Subject: 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 Reviewed-on: https://gerrit.chromium.org/gerrit/39914 Reviewed-by: Bill Richardson --- chip/lm4/lpc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.1