Microchip: MEC172x: kscan driver

Update keyscan driver to support MEC172x device

Signed-off-by: Jay Vasanth <jay.vasanth@microchip.com>
This commit is contained in:
Jay Vasanth 2021-11-22 14:41:23 -05:00 committed by Anas Nashif
commit f6394e0d54
6 changed files with 250 additions and 96 deletions

View file

@ -3,9 +3,12 @@
# Copyright (c) 2019 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
DT_COMPAT_ST_KSCAN_XEC := microchip,xec-kscan
menuconfig KSCAN_XEC
bool "XEC Microchip KSCAN driver"
bool "Microchip XEC series KSCAN driver"
depends on SOC_FAMILY_MEC
default $(dt_compat_enabled,$(DT_COMPAT_ST_KSCAN_XEC))
select MULTITHREADING
help
Enable the Microchip XEC Kscan IO driver.
@ -13,33 +16,33 @@ menuconfig KSCAN_XEC
if KSCAN_XEC
config KSCAN_XEC_COLUMN_SIZE
int "KSCAN_XEC_COLUMN_SIZE"
int "Keyscan XEC Column Size"
default 16
help
Adjust the value to your keyboard columns. The maximum
column size for the Microchip XEC family is 18 (from 0 to 17).
config KSCAN_XEC_ROW_SIZE
int "KSCAN_XEC_ROW_SIZE"
int "Keyscan XEC Row Size"
default 8
help
Adjust the value to your keyboard rows. The maximum
column size for the Microchip XEC family is 8 (from 0 to 7).
config KSCAN_XEC_DEBOUNCE_DOWN
int "KSCAN_XEC_DEBOUNCE_DOWN"
int "Keyscan XEC Debounce Down"
default 10
help
Determines the time in msecs for debouncing a key press.
config KSCAN_XEC_DEBOUNCE_UP
int "KSCAN_XEC_DEBOUNCE_UP"
int "Keyscan XEC Debounce Up"
default 20
help
Determines the time in msecs for debouncing a key release.
config KSCAN_XEC_POLL_PERIOD
int "KSCAN_XEC_POLL_PERIOD"
int "Keyscan XEC Poll Period"
default 5
help
Defines the poll period in msecs between between matrix scans.