diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-21 13:43:36 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2013-10-22 17:56:20 +0000 |
commit | 99d52c8874b515938f8f6ae8fefc8e7c918b0ba2 (patch) | |
tree | b146a625ab881457aaa483a730bc46d5c4f3cca2 | |
parent | a318cc90687a2e4479d849ab8b8b6957614f39c6 (diff) | |
download | chrome-ec-99d52c8874b515938f8f6ae8fefc8e7c918b0ba2.tar.gz |
cleanup: FIFO comment in MKBP driver
A 16-element FIFO consumes 208 bytes of RAM, which isn't too horrible.
No code changes, just expanding on a comment.
BUG=none
BRANCH=none
TEST=build spring
Change-Id: Ibb51970b6fc72623435d21bd0b368c3e60da24da
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173922
Reviewed-by: Vic Yang <victoryang@chromium.org>
-rw-r--r-- | common/keyboard_mkbp.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index a77320f030..33ba1e782a 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -24,7 +24,15 @@ #define CPUTS(outstr) cputs(CC_KEYBOARD, outstr) #define CPRINTF(format, args...) cprintf(CC_KEYBOARD, format, ## args) -#define KB_FIFO_DEPTH 16 /* FIXME: this is pretty huge */ +/* + * Keyboard FIFO depth. This needs to be big enough not to overflow if a + * series of keys is pressed in rapid succession and the kernel is too busy + * to read them out right away. + * + * RAM usage is (depth * #cols); see kb_fifo[][] below. A 16-entry FIFO will + * consume 16x13=208 bytes, which is non-trivial but not horrible. + */ +#define KB_FIFO_DEPTH 16 /* Changes to col,row here need to also be reflected in kernel. * drivers/input/mkbp.c ... see KEY_BATTERY. |