summaryrefslogtreecommitdiff
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
commit647fd77b92547749616f0b84318fcc6c58ac8a1e (patch)
tree5c34b902b86d5bf3972a30ebea44b99728c96ce1
parentbf80bbf769270e094f224560e23f32fa4ca77144 (diff)
downloadchrome-ec-647fd77b92547749616f0b84318fcc6c58ac8a1e.tar.gz
coral: never enter tablet mode for clamshell SKUs.
Coral family has couple SKUs configured in clamshell form factor, in order to avoid external magnetic field unexpectedly deasserts TABLET_MODE_L and switches device into tablet mode, this patch ignores the TABLET_MODE_L pin status for those SKUs. In other words, always set tablet_mode as 0 for clamshell SKUs. BUG=b:67917181 TEST=emerge-coral chromeos-ec, image it to clamshell device, apply external magnetic field and examine there is no unexpected switching to tablet mode through watching powerd logs. Change-Id: Ibbe08a00bb14144cad87fdd5a4a39cb3bfe2968e Signed-off-by: Harry Pan <harry.pan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/748944 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--board/coral/board.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/board/coral/board.c b/board/coral/board.c
index 4614fdf73f..9205a1ddd0 100644
--- a/board/coral/board.c
+++ b/board/coral/board.c
@@ -533,7 +533,12 @@ DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT);
static void board_set_tablet_mode(void)
{
- tablet_set_mode(!gpio_get_level(GPIO_TABLET_MODE_L));
+ int tablet_mode = 0;
+
+ if (SKU_IS_CONVERTIBLE(sku_id))
+ tablet_mode = !gpio_get_level(GPIO_TABLET_MODE_L);
+
+ tablet_set_mode(tablet_mode);
}
/* Initialize board. */