diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2020-10-12 11:02:39 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-14 06:10:49 +0000 |
commit | 19d0edf872e988188443e70976592212f3e38895 (patch) | |
tree | f95ca3e46ab624fbfbfe9ff9325dfe2dcb14f07c /chip/it83xx | |
parent | a57076ce03b3aa43d5cf62371649a7e9a28667e2 (diff) | |
download | chrome-ec-19d0edf872e988188443e70976592212f3e38895.tar.gz |
it83xx/keyboard: support keyboard_raw_is_input_low()
Support keyboard_raw_is_input_low() for enable CONFIG_KEYBOARD_FACTORY_TEST.
BUG=b:170699805
BRANCH=none
TEST=The function works as expected.
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Change-Id: I30ff914bdaf3fe47949227fa0a5cee327408913e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2463037
Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'chip/it83xx')
-rw-r--r-- | chip/it83xx/keyboard_raw.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chip/it83xx/keyboard_raw.c b/chip/it83xx/keyboard_raw.c index 25f2b49c00..6c7a10c463 100644 --- a/chip/it83xx/keyboard_raw.c +++ b/chip/it83xx/keyboard_raw.c @@ -151,3 +151,8 @@ void keyboard_raw_interrupt(void) /* Wake the scan task */ task_wake(TASK_ID_KEYSCAN); } + +int keyboard_raw_is_input_low(int port, int id) +{ + return !(IT83XX_GPIO_DATA_MIRROR(port) & BIT(id)); +} |