From 325c93fa94dc8ffbd15386d66c45dc0aaca262bb Mon Sep 17 00:00:00 2001 From: Vijay Hiremath Date: Wed, 25 Jan 2017 14:29:52 -0800 Subject: [PATCH] reef: Disable Trackpad in S5 to save power BUG=chrome-os-partner:59712 BRANCH=reef TEST=gpioget EN_P3300_TRACKPAD_ODL is 1 in S5 & below, 0 otherwise. Change-Id: Iee55325c20df53aaa7f65c8c3091e343698d70fb Signed-off-by: Vijay Hiremath Reviewed-on: https://chromium-review.googlesource.com/433083 Commit-Ready: Vijay P Hiremath Tested-by: Vijay P Hiremath Reviewed-by: Aaron Durbin --- board/reef/board.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/board/reef/board.c b/board/reef/board.c index 0a91bd7069..82a2df4dc8 100644 --- a/board/reef/board.c +++ b/board/reef/board.c @@ -687,6 +687,9 @@ static void board_chipset_startup(void) /* Enable USB-A port. */ gpio_set_level(GPIO_USB1_ENABLE, 1); + /* Enable Trackpad */ + gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, 0); + hook_call_deferred(&enable_input_devices_data, 0); } DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT); @@ -697,6 +700,9 @@ static void board_chipset_shutdown(void) /* Disable USB-A port. */ gpio_set_level(GPIO_USB1_ENABLE, 0); + /* Disable Trackpad */ + gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, 1); + hook_call_deferred(&enable_input_devices_data, 0); /* FIXME(dhendrix): Drive USB_PD_RST_ODL low to prevent leakage? (see comment in schematic) */