summaryrefslogtreecommitdiff
path: root/board/coral
diff options
context:
space:
mode:
authorHarry Pan <harry.pan@intel.com>2017-11-01 17:57:16 +0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-30 07:09:40 -0800
commit9ef9db911c6b86e1c07a5ac57cb1a23173774d83 (patch)
treeb584eefc4715238ccbedff5d59b8cfd10d073f33 /board/coral
parent647fd77b92547749616f0b84318fcc6c58ac8a1e (diff)
downloadchrome-ec-9ef9db911c6b86e1c07a5ac57cb1a23173774d83.tar.gz
coral: disable tablet mode interrupt for clamshell models.
Coral family has couple SKUs configured in clamshell form factor, in order to avoid external magnetic field unexpectedly switches clamshell device into tablet mode, this patch disables tablet mode interrupt for SKUs in clamshell form factor. BUG=b:67917181 TEST=emerge-coral chromeos-ec, image to clameshell device, apply external magnetic field and examine no unexpected switching to tablet mode through watching powerd logs; alternately, watch the command 'ectool gpioget TABLET_MODE_L' changes from 1 to 0 without interrupt, this requires some hacking dump in board_set_tablet_mode() as reverse proof. i.e. tablet_mode_interrupt() ... (deferred hook) enable_input_devices() board_set_tablet_mode() Change-Id: Iccf14cd5e2ea71ab3204aa386f476a9a0e1550c4 Signed-off-by: Harry Pan <harry.pan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/754148 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/coral')
-rw-r--r--board/coral/board.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/board/coral/board.c b/board/coral/board.c
index 9205a1ddd0..7a36855c5c 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -1019,6 +1019,13 @@ static void board_get_sku_id(void)
CPRINTS("SKU ID: %d", sku_id);
/* Use sku_id to set motion sensor count */
board_set_motion_sensor_count(sku_id);
+
+ if (0 == SKU_IS_CONVERTIBLE(sku_id)) {
+ CPRINTS("Disable tablet mode interrupt");
+ gpio_disable_interrupt(GPIO_TABLET_MODE_L);
+ /* Enfore device in laptop mode */
+ tablet_set_mode(0);
+ }
}
}
/* This can't run until after the ADC module has been initialized */