diff options
author | Jett Rink <jettrink@chromium.org> | 2018-05-17 09:38:07 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-05-18 20:08:26 -0700 |
commit | 5551befe2a0bf0e6958d7830aefb0026f05843d1 (patch) | |
tree | 6f25db1546a2b3b39703c3813c0433764f676e47 /board/yorp | |
parent | 04fbcdb20f5f6c52c10f04e2113fd190a1847745 (diff) | |
download | chrome-ec-5551befe2a0bf0e6958d7830aefb0026f05843d1.tar.gz |
octopus: enable trackpad (S3+) and backlight (S0)
Enable trackpad when entering S3, and display backlight when entering S0
and disable them on the opposite transition. Moving common code to
baseboard.
BRANCH=none
BUG=b:79900266
TEST=bip trackpad works in S3 as wake source. backlight turns off in
S0ix and S3.
Change-Id: I0937771093d87c020b3c0d94a482d108c5a5c180
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1064693
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/yorp')
-rw-r--r-- | board/yorp/board.c | 28 | ||||
-rw-r--r-- | board/yorp/gpio.inc | 7 |
2 files changed, 5 insertions, 30 deletions
diff --git a/board/yorp/board.c b/board/yorp/board.c index 388421ff29..d07a8c0194 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -193,34 +193,6 @@ const struct temp_sensor_t temp_sensors[] = { }; BUILD_ASSERT(ARRAY_SIZE(temp_sensors) == TEMP_SENSOR_COUNT); -/* 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); - - /* - * GPIO_ENABLE_BACKLIGHT is AND'ed with SOC_EDP_BKLTEN from the SoC and - * LID_OPEN connection in hardware. - */ - gpio_set_level(GPIO_ENABLE_BACKLIGHT, 1); -} -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); - - /* - * GPIO_ENABLE_BACKLIGHT is AND'ed with SOC_EDP_BKLTEN from the SoC and - * LID_OPEN connection in hardware. - */ - gpio_set_level(GPIO_ENABLE_BACKLIGHT, 0); -} -DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); - enum adc_channel board_get_vbus_adc(int port) { return port ? ADC_VBUS_C1 : ADC_VBUS_C0; diff --git a/board/yorp/gpio.inc b/board/yorp/gpio.inc index 5b16c12efc..ec4e084bd3 100644 --- a/board/yorp/gpio.inc +++ b/board/yorp/gpio.inc @@ -61,13 +61,16 @@ 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(7, 2), GPIO_OUT_LOW) /* Enable A Rails via PMIC */ GPIO(PCH_RSMRST_L, PIN(C, 2), GPIO_OUT_LOW) /* RSMRST# to SOC. All _A rails now up. */ GPIO(PCH_SYS_PWROK, PIN(B, 7), GPIO_OUT_LOW) /* EC_PCH_PWROK. All S0 rails now up. */ -GPIO(ENABLE_BACKLIGHT, PIN(D, 3), GPIO_ODR_HIGH | GPIO_SEL_1P8V) /* EC_BL_EN_OD */ + +/* Peripheral rails */ +GPIO(ENABLE_BACKLIGHT, PIN(D, 3), GPIO_ODR_HIGH | + GPIO_SEL_1P8V) /* EC_BL_EN_OD */ +GPIO(EN_P3300_TRACKPAD_ODL, PIN(3, 3), GPIO_ODR_HIGH) GPIO(EC_BATT_PRES_L, PIN(E, 5), GPIO_INPUT) |