summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2020-02-27 14:15:04 -0700
committerCommit Bot <commit-bot@chromium.org>2020-03-02 06:55:22 +0000
commit1066c43cb64399e75d810cd0b6d126c0d153407d (patch)
tree680ea8166d6800570606a4f287cbe379f56f07e8
parent3d82db55bb854c2e596d4f52d5b58e32c53ca8b6 (diff)
downloadchrome-ec-1066c43cb64399e75d810cd0b6d126c0d153407d.tar.gz
common/keyboard_8042: Add logging to keyboard_clear_buffer
It's useful to know when the buffer has been cleared. BUG=b:145575366 BRANCH=none TEST=Saw x in kblog Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I1c3474687c91a3e017d7a7a0e4e7967c3fb10f05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2079693 Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r--common/keyboard_8042.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/keyboard_8042.c b/common/keyboard_8042.c
index 3e17e1736f..feac0dd7f3 100644
--- a/common/keyboard_8042.c
+++ b/common/keyboard_8042.c
@@ -173,6 +173,8 @@ struct kblog_t {
* k = to-host queue head pointer before byte dequeued
* K = byte actually sent to host via LPC
*
+ * x = to_host queue was cleared
+ *
* The to-host head and tail pointers are logged pre-wrapping to the
* queue size. This means that they continually increment as units
* are dequeued and enqueued respectively. Since only the bottom
@@ -386,7 +388,9 @@ static void reset_rate_and_delay(void)
void keyboard_clear_buffer(void)
{
+ CPRINTS("KB Clear Buffer");
mutex_lock(&to_host_mutex);
+ kblog_put('x', queue_count(&to_host));
queue_init(&to_host);
mutex_unlock(&to_host_mutex);
lpc_keyboard_clear_buffer();