From 65d87bf9f0ef9b084d91ed44eda58b7463c82b48 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Wed, 30 May 2018 15:55:57 +0800 Subject: whiskers: Expose a switch for tablet mode With this, whiskers exposes a tablet mode switch to inform the lid when the base is flipped around. We take this opportunity to clean up a bit whiskers/keyboard code: - Use tablet mode switch instead of lid switch - Refactor usb_hid_keyboard.c to accept either assistant key or tablet mode switch, or both. - Remove bit-field usage in HID report struct, and instead, generalize with an "extra" field that can be used for additional key/switches. BRANCH=none BUG=b:73133611 TEST=Flash whiskers, see that tablet mode events are sent when a magnet approaches the hall sensor. Change-Id: Ibf43bb04fdc867d18d9f318388d1ebd17b49d47f Signed-off-by: Nicolas Boichat Reviewed-on: https://chromium-review.googlesource.com/1077915 Reviewed-by: Wei-Han Chen --- board/hammer/gpio.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/hammer/gpio.inc') diff --git a/board/hammer/gpio.inc b/board/hammer/gpio.inc index 8786c435d1..4f8e28a5a7 100644 --- a/board/hammer/gpio.inc +++ b/board/hammer/gpio.inc @@ -11,7 +11,7 @@ #ifdef SECTION_IS_RW GPIO_INT(TOUCHPAD_INT, PIN(B, 8), GPIO_INT_FALLING, touchpad_interrupt) #ifdef BOARD_WHISKERS -GPIO_INT(LID_OPEN, PIN(B, 11), GPIO_PULL_UP | GPIO_INT_BOTH, lid_interrupt) +GPIO_INT(TABLET_MODE_L, PIN(B, 11), GPIO_PULL_UP | GPIO_INT_BOTH, tablet_mode_isr) #endif /* BOARD_WHISKERS */ #endif /* SECTION_IS_RW */ -- cgit v1.2.1