From 9bf1539d213924624c65a26494ad7863c05f022a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 4 Oct 2012 09:43:01 -0700 Subject: [PATCH] stm32: Reduce keyboard scan period from 10ms to 3ms Experimentally it is possible to press a key on snow for only 4.8ms. We should aim to scan more frequently to catch those who only just touch the keys, or type very quickly. It takes a little over 2ms to complete a keyboard scan at present. We shold aim to reduce this, but for now, it seems safe to reduce the default scanning frequency to 3ms. BUG=chrome-os-partner:12179 TEST=manual Type on keyboard on snow in browser, and see that we still get results and the EC is stable. Change-Id: I60827c33a58c34dd808504e58bca480bd61f5932 BRANCH=snow Signed-off-by: Simon Glass Reviewed-on: https://gerrit.chromium.org/gerrit/34634 Reviewed-by: Randall Spangler --- chip/stm32/keyboard_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chip/stm32/keyboard_scan.c b/chip/stm32/keyboard_scan.c index 638098b2b6..10bc3e4004 100644 --- a/chip/stm32/keyboard_scan.c +++ b/chip/stm32/keyboard_scan.c @@ -93,7 +93,7 @@ static struct ec_mkbp_config config = { EC_MKBP_VALID_DEBOUNCE_UP | EC_MKBP_VALID_FIFO_MAX_DEPTH, .valid_flags = EC_MKBP_FLAGS_ENABLE, .flags = EC_MKBP_FLAGS_ENABLE, - .scan_period_us = 10000, + .scan_period_us = 3000, .poll_timeout_us = 100 * 1000, .min_post_scan_delay_us = 1000, .output_settle_us = 50,