summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor@chromium.org>2018-08-15 17:16:35 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-12-08 02:40:58 +0000
commitee8d4acc70caee32b5515552f4266ee5e1001259 (patch)
treeed8a83a7b33532c93e4cc654241ee027de8d434e
parent874ed0887f235588dc384404bbee5ca448eafbec (diff)
downloadchrome-ec-ee8d4acc70caee32b5515552f4266ee5e1001259.tar.gz
common: add API to expose detachable "base" state
On some detachables, when base is attached, we know right away that the device should transition from tablet to clamshell mode. However on other detachables we need additional information (i.e. base position) before we decide whether to transition in/out of tablet mode. For such detachables let's allow them to signal a new "base attached" switch event, so that the rest of the stack is not confused. BUG=b:73133611 BRANCH=nocturne TEST=Build and boot Change-Id: I9be3450cba52bf9f0bad8333402f68b0c7903090 Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1176801 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1364317 Reviewed-by: YH Lin <yueherngl@chromium.org> Commit-Queue: YH Lin <yueherngl@chromium.org> Tested-by: YH Lin <yueherngl@chromium.org>
-rw-r--r--include/ec_commands.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h
index df5288a377..fe72340fb8 100644
--- a/include/ec_commands.h
+++ b/include/ec_commands.h
@@ -591,7 +591,7 @@ enum host_event_code {
/* EC desires to change state of host-controlled USB mux */
EC_HOST_EVENT_USB_MUX = 28,
- /* TABLET/LAPTOP mode event*/
+ /* TABLET/LAPTOP mode or detachable base attach/detach event */
EC_HOST_EVENT_MODE_CHANGE = 29,
/* Keyboard recovery combo with hardware reinitialization */
@@ -3266,6 +3266,7 @@ struct __ec_align1 ec_response_get_next_event_v1 {
/* Switches */
#define EC_MKBP_LID_OPEN 0
#define EC_MKBP_TABLET_MODE 1
+#define EC_MKBP_BASE_ATTACHED 2
/* Run keyboard factory test scanning */
#define EC_CMD_KEYBOARD_FACTORY_TEST 0x0068