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>
This commit is contained in:
Randall Spangler
2012-12-18 15:47:52 -08:00
committed by Gerrit
parent eb6e08570a
commit 7326b7475a

View File

@@ -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;
}