Use CONFIG_KEYBOARD_DEBUG for keyboard debug printf

Remove keyboard printk like:  KB wait/poll when not debugging keyboard.

BUG=none
BRANCH=none
TEST=compile.

Change-Id: I9743eab4597d2b661ae7b21c0aab4e1ffdcdb9a4
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/394068
This commit is contained in:
Gwendal Grignou
2016-10-04 11:24:07 -07:00
committed by chrome-bot
parent 473ecbe2b3
commit ce92dd27df
2 changed files with 14 additions and 3 deletions

View File

@@ -27,6 +27,14 @@
#define CPRINTF(format, args...) cprintf(CC_KEYSCAN, format, ## args)
#define CPRINTS(format, args...) cprints(CC_KEYSCAN, format, ## args)
#ifdef CONFIG_KEYBOARD_DEBUG
#define CPUTS5(outstr) cputs(CC_KEYSCAN, outstr)
#define CPRINTS5(format, args...) cprints(CC_KEYBOARD, format, ## args)
#else
#define CPUTS5(outstr)
#define CPRINTS5(format, args...)
#endif
#define SCAN_TIME_COUNT 32 /* Number of last scan times to track */
/* If we're waiting for a scan to happen, we'll give it this long */
@@ -481,7 +489,7 @@ static int check_keys_changed(uint8_t *state)
if (print_state_changes)
print_state(state, "state");
#ifdef PRINT_SCAN_TIMES
#ifdef CONFIG_KEYBOARD_PRINT_SCAN_TIMES
/* Print delta times from now back to each previous scan */
CPRINTF("[%T kb deltaT");
for (i = 0; i < SCAN_TIME_COUNT; i++) {
@@ -644,7 +652,7 @@ void keyboard_scan_task(void)
while (1) {
/* Enable all outputs */
CPRINTS("KB wait");
CPRINTS5("KB wait");
keyboard_raw_enable_interrupt(1);
@@ -696,7 +704,7 @@ void keyboard_scan_task(void)
force_poll = 0;
/* Enter polling mode */
CPRINTS("KB poll");
CPRINTS5("KB poll");
keyboard_raw_enable_interrupt(0);
keyboard_raw_drive_column(KEYBOARD_COLUMN_NONE);

View File

@@ -1364,6 +1364,9 @@
*/
#undef CONFIG_KEYBOARD_POST_SCAN_CLOCKS
/* Print keyboard scan time intervals. */
#undef CONFIG_KEYBOARD_PRINT_SCAN_TIMES
/*
* Call board-supplied keyboard_suppress_noise() function when the debounced
* keyboard state changes. Some boards use this to send a signal to the audio