From bbdff9dbb8e9f37ab444f72c48b70fa76a5e18bf Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 12 Apr 2018 18:14:21 +0800 Subject: [PATCH] hammer: Disable side-band wake using detection pin Side-band wake was only useful when the lid would go in deep-S3, where the USB interface is disabled. Since we are using S0ix on poppy and derivatives, the side band wake is useless, and, in some rare case, may actually cause issues. BRANCH=poppy BUG=b:77828249 TEST=Flash staff, can wake soraka from suspend, or from USB autosuspend. Change-Id: I23398a792157b32a5d79505dcffc92aaffd4fec2 Signed-off-by: Nicolas Boichat Reviewed-on: https://chromium-review.googlesource.com/1011523 Reviewed-by: Furquan Shaikh --- board/hammer/board.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/board/hammer/board.c b/board/hammer/board.c index 54c5305eb9..e0edde5884 100644 --- a/board/hammer/board.c +++ b/board/hammer/board.c @@ -237,30 +237,6 @@ int board_has_keyboard_backlight(void) return has_keyboard_backlight; } -/* - * Side-band USB wake, to be able to wake lid even in deep S3, when USB - * controller is off. - */ -void board_usb_wake(void) -{ -#if defined(BOARD_WAND) || defined(BOARD_WHISKERS) - /* FIXME: Implement side-band wake for wand. */ -#else - /* - * Poke detection pin for about 500us, we disable interrupts - * to make sure that we do not get preempted (setting GPIO high - * for too long would prevent pulse detection on lid EC side from - * working properly, or even kill hammer power if it is held for - * longer than debounce time). - */ - interrupt_disable(); - gpio_set_flags(GPIO_BASE_DET, GPIO_OUT_HIGH); - udelay(500); - gpio_set_flags(GPIO_BASE_DET, GPIO_INPUT); - interrupt_enable(); -#endif -} - /* Reset the touchpad, mainly used to recover it from malfunction. */ void board_touchpad_reset(void) {