diff options
author | Alexandru M Stan <amstan@chromium.org> | 2019-07-09 15:21:41 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-19 07:22:39 +0000 |
commit | 941fb7e8e73ff1cb4e6ed170bee8e755a5416a50 (patch) | |
tree | 4c1ee5c64463387e5c4ae34cd1201e2d1e2256ad /board/jacuzzi/board.c | |
parent | 7abc7ca4abbc2f4154e177389924c258ea37ff5d (diff) | |
download | chrome-ec-941fb7e8e73ff1cb4e6ed170bee8e755a5416a50.tar.gz |
jacuzzi: Add keyboard functionality
Added IT8801 io expander (which includes keyboard controller) and
the keyscan task.
BUG=b:133200075
TEST="it8801_dump" should check presence of the IT8801 chip
TEST="ksstate on", press keys, see keyboard log things being printed on console
BRANCH=master
Change-Id: I08e7312cec59b6d293c01daf40b2f784a10b7e72
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1693863
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Diffstat (limited to 'board/jacuzzi/board.c')
-rw-r--r-- | board/jacuzzi/board.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/board/jacuzzi/board.c b/board/jacuzzi/board.c index 1dd26c0e4b..3b81029f73 100644 --- a/board/jacuzzi/board.c +++ b/board/jacuzzi/board.c @@ -18,6 +18,7 @@ #include "driver/battery/max17055.h" #include "driver/bc12/pi3usb9201.h" #include "driver/charger/isl923x.h" +#include "driver/ioexpander_it8801.h" #include "driver/sync.h" #include "driver/tcpm/fusb302.h" #include "driver/usb_mux/it5205.h" @@ -27,6 +28,7 @@ #include "hooks.h" #include "host_command.h" #include "i2c.h" +#include "keyboard_scan.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -79,6 +81,24 @@ const struct power_signal_info power_signal_list[] = { }; BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); +/* Keyboard scan setting */ +struct keyboard_scan_config keyscan_config = { + /* + * TODO(b/133200075): Tune this once we have the final performance + * out of the driver and the i2c bus. + */ + .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, + .poll_timeout_us = 100 * MSEC, + .actual_key_mask = { + 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */ + }, +}; + /******************************************************************************/ /* SPI devices */ /* TODO: to be added once sensors land via CL:1714436 */ |