From aa46cca7fc82e27ae25c4798c3547031a5567607 Mon Sep 17 00:00:00 2001 From: Ting Shen Date: Tue, 11 Feb 2020 15:48:24 +0800 Subject: kappa: reduce bitbang failrate IRQ too often may cause bitbang generate incorrec clock waves, and make slave thinks transfer timeout. Reduce the busyloop interval in keyscan task to make bitbang waveform looks better, and also increase bitbang retry count to further reduce fail rate. BUG=b:147842740 TEST=verify that no battery error while typing. BRANCH=kukui Change-Id: If157073a8651e481fc798da30e0ead73c5837339 Signed-off-by: Ting Shen Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2050003 Tested-by: Devin Lu Tested-by: Ting Shen Commit-Queue: Ting Shen Reviewed-by: Eric Yilun Lin --- board/kappa/board.c | 4 ++-- board/kappa/board.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'board/kappa') diff --git a/board/kappa/board.c b/board/kappa/board.c index 8ebd0ee349..97644e78d8 100644 --- a/board/kappa/board.c +++ b/board/kappa/board.c @@ -94,8 +94,8 @@ struct keyboard_scan_config keyscan_config = { .output_settle_us = 35, .debounce_down_us = 5 * MSEC, .debounce_up_us = 40 * MSEC, - .scan_period_us = 3 * MSEC, - .min_post_scan_delay_us = 1000, + .scan_period_us = 10 * MSEC, + .min_post_scan_delay_us = 10 * MSEC, .poll_timeout_us = 100 * MSEC, .actual_key_mask = { 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, diff --git a/board/kappa/board.h b/board/kappa/board.h index a8a5880074..3e594dc7d9 100644 --- a/board/kappa/board.h +++ b/board/kappa/board.h @@ -33,7 +33,7 @@ #define CONFIG_I2C_BITBANG #define I2C_BITBANG_PORT_COUNT 1 #undef CONFIG_I2C_NACK_RETRY_COUNT -#define CONFIG_I2C_NACK_RETRY_COUNT 3 +#define CONFIG_I2C_NACK_RETRY_COUNT 10 #define CONFIG_SMBUS_PEC #define CONFIG_USB_PD_TCPM_FUSB302 -- cgit v1.2.1