mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 08:31:52 +00:00
common: add feature bit for touchpad support
Add a new 'feature' bit to allow the host to auto-detect a TP MCU. Signed-off-by: Wei-Ning Huang <wnhuang@google.com> BRANCH=none BUG=b:37584134 TEST=on eve with TP connected, look at the feature bit. Change-Id: I81b30b96b31fc8dcb6769dd146fb33cdd487fddf Reviewed-on: https://chromium-review.googlesource.com/485422 Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org> Tested-by: Wei-Ning Huang <wnhuang@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
ba105838f5
commit
a12bf17be9
@@ -789,6 +789,9 @@ static int host_command_get_features(struct host_cmd_handler_args *args)
|
||||
#endif
|
||||
#ifdef CONFIG_SPI_FP_PORT
|
||||
| EC_FEATURE_MASK_0(EC_FEATURE_FINGERPRINT)
|
||||
#endif
|
||||
#ifdef HAS_TASK_CENTROIDING
|
||||
| EC_FEATURE_MASK_0(EC_FEATURE_TOUCHPAD)
|
||||
#endif
|
||||
;
|
||||
return EC_RES_SUCCESS;
|
||||
|
||||
@@ -1078,6 +1078,8 @@ enum ec_feature_code {
|
||||
EC_FEATURE_RTC = 27,
|
||||
/* The MCU exposes a Fingerprint sensor */
|
||||
EC_FEATURE_FINGERPRINT = 28,
|
||||
/* The MCU exposes a Touchpad */
|
||||
EC_FEATURE_TOUCHPAD = 29,
|
||||
};
|
||||
|
||||
#define EC_FEATURE_MASK_0(event_code) (1UL << (event_code % 32))
|
||||
|
||||
@@ -512,6 +512,7 @@ static const char * const ec_feature_names[] = {
|
||||
[EC_FEATURE_VSTORE] = "Temporary secure vstore",
|
||||
[EC_FEATURE_USBC_SS_MUX_VIRTUAL] = "Host-controlled USB-C SS mux",
|
||||
[EC_FEATURE_RTC] = "Real-time clock",
|
||||
[EC_FEATURE_TOUCHPAD] = "Touchpad",
|
||||
};
|
||||
|
||||
int cmd_inventory(int argc, char *argv[])
|
||||
|
||||
Reference in New Issue
Block a user