diff options
author | Shamile Khan <shamile.khan@intel.com> | 2018-03-28 09:23:00 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-31 04:34:09 -0700 |
commit | ba20a766609679648e92c5fd1cd209b5b6c8483f (patch) | |
tree | 645b812645763a9f1dafe4b5fb6dd5beb9324a1f /board | |
parent | f319a80975afe6f34286c9cbf115b815fa8c6416 (diff) | |
download | chrome-ec-ba20a766609679648e92c5fd1cd209b5b6c8483f.tar.gz |
yorp: Enable Trackpad power
Enable trackpad power when chipset is in S0 state. Keep
it disabled in other states.
BUG=b:73137125
BRANCH=master
TEST=On Octopus, kernel logs show ELAN enumerated
Change-Id: Ie1fd8ab777e82d900418127b4efee29fe65d1423
Signed-off-by: Shamile Khan <shamile.khan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/984405
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/yorp/board.c | 16 | ||||
-rw-r--r-- | board/yorp/gpio.inc | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c index c1ddee08ca..c7a9a3e56c 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -140,6 +140,22 @@ static void chipset_pre_init(void) } DECLARE_HOOK(HOOK_CHIPSET_PRE_INIT, chipset_pre_init, HOOK_PRIO_DEFAULT); +/* Called on AP S3 -> S0 transition */ +static void board_chipset_resume(void) +{ + /* Enable Trackpad Power when chipset is in S0 */ + gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); + +/* Called on AP S0 -> S3 transition */ +static void board_chipset_suspend(void) +{ + /* Disable Trackpad Power when chipset transitions to sleep state */ + gpio_set_level(GPIO_EN_P3300_TRACKPAD_ODL, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); + /* Called by APL power state machine when transitioning to G3. */ void chipset_do_shutdown(void) { diff --git a/board/yorp/gpio.inc b/board/yorp/gpio.inc index 65a69600d0..fd095867e9 100644 --- a/board/yorp/gpio.inc +++ b/board/yorp/gpio.inc @@ -53,6 +53,7 @@ GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_ODR_HIGH) /* GPIO_PCH_PWRBTN_L */ GPIO(EN_PP5000, PIN(7, 3), GPIO_OUT_LOW) /* EN_PP5000_A */ GPIO(PP5000_PG, PIN(C, 0), GPIO_INPUT) /* PP5000_PG_OD */ +GPIO(EN_P3300_TRACKPAD_ODL, PIN(3, 3), GPIO_ODR_HIGH) GPIO(EN_PP3300, PIN(D, 4), GPIO_OUT_LOW) /* EN_PP3300_A */ GPIO(PP3300_PG, PIN(6, 0), GPIO_INPUT) /* PP3300_PG_OD */ GPIO(PMIC_EN, PIN(D, 7), GPIO_OUT_LOW) /* Enable A Rails via PMIC */ |