diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-11-13 18:43:52 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-18 01:35:07 +0000 |
commit | 612284f62b1b5f72083334a90d196707553223ba (patch) | |
tree | 33182507821bafdbf0a4dfa8d454a0fcbd249707 | |
parent | 45173bfb53014626057980a9b8911ca23002ff5a (diff) | |
download | chrome-ec-612284f62b1b5f72083334a90d196707553223ba.tar.gz |
keyboard_mkbp: Add a virtual switch EC_MKBP_FRONT_PROXIMITY
Add a new virtual switch to indicate whether a nearby object is
present in front of the device. The implementation will be added
later.
BRANCH=None
BUG=b:168714440
TEST=Built the image correctly.
Change-Id: I4cc71a35d8aac391719a5966ec2d57a5bb1d4761
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2543111
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
-rw-r--r-- | common/keyboard_mkbp.c | 3 | ||||
-rw-r--r-- | include/config.h | 6 | ||||
-rw-r--r-- | include/ec_commands.h | 1 |
3 files changed, 10 insertions, 0 deletions
diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index 45cd50f4f5..4de8952254 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -474,6 +474,9 @@ static uint32_t get_supported_switches(void) #ifdef CONFIG_BASE_ATTACHED_SWITCH val |= BIT(EC_MKBP_BASE_ATTACHED); #endif +#ifdef CONFIG_FRONT_PROXIMITY_SWITCH + val |= BIT(EC_MKBP_FRONT_PROXIMITY); +#endif return val; } diff --git a/include/config.h b/include/config.h index 2b54fdf5d3..27bfbb950c 100644 --- a/include/config.h +++ b/include/config.h @@ -3528,6 +3528,12 @@ #undef CONFIG_BASE_ATTACHED_SWITCH /* + * Add a virtual switch to indicate whether a nearby object is present in front + * of the device. + */ +#undef CONFIG_FRONT_PROXIMITY_SWITCH + +/* * Microchip Trace FIFO Debug Port */ #undef CONFIG_MCHP_TFDP diff --git a/include/ec_commands.h b/include/ec_commands.h index c0bd7ae1ea..02e8dab7f2 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -3792,6 +3792,7 @@ struct ec_response_get_next_event_v1 { #define EC_MKBP_LID_OPEN 0 #define EC_MKBP_TABLET_MODE 1 #define EC_MKBP_BASE_ATTACHED 2 +#define EC_MKBP_FRONT_PROXIMITY 3 /* Run keyboard factory test scanning */ #define EC_CMD_KEYBOARD_FACTORY_TEST 0x0068 |