mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 17:41:54 +00:00
grunt: Turn PP1800_SENSOR off in S5
Disable sensor power (lid accel, gyro) in G3+S5. Enable it in S3+S0. We want it on in S3 for calculating the lid angle (needed on convertibles to disable resume from keyboard in tablet mode). BUG=b:72741289 BRANCH=none TEST=GPIO_EN_PP1800_SENSOR =0 in G3+S5 and =1 in S3+S0 Change-Id: I043b880b9fbd44242df0d2ac01c92a066d6b4377 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/912452 Reviewed-by: Lann Martin <lannm@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
This commit is contained in:
@@ -237,6 +237,24 @@ static void board_chipset_resume(void)
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void board_chipset_startup(void)
|
||||
{
|
||||
/*
|
||||
* Enable sensor power (lid accel, gyro) in S3 for calculating the lid
|
||||
* angle (needed on convertibles to disable resume from keyboard in
|
||||
* tablet mode).
|
||||
*/
|
||||
gpio_set_level(GPIO_EN_PP1800_SENSOR, 1);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_STARTUP, board_chipset_startup, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void board_chipset_shutdown(void)
|
||||
{
|
||||
/* Disable sensor power (lid accel, gyro) in S5. */
|
||||
gpio_set_level(GPIO_EN_PP1800_SENSOR, 0);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT);
|
||||
|
||||
/**
|
||||
* Power on (or off) a single TCPC.
|
||||
* minimum on/off delays are included.
|
||||
|
||||
@@ -26,7 +26,7 @@ GPIO_INT(USB_C0_CABLE_DET, PIN(3, 7), GPIO_INT_RISING, anx74xx_cable_det_inter
|
||||
GPIO_INT(6AXIS_INT_L, PIN(8, 6), GPIO_INT_FALLING | GPIO_SEL_1P8V, bmi160_interrupt)
|
||||
|
||||
GPIO(EN_PWR_A, PIN(E, 2), GPIO_OUT_HIGH) /* Enable Power */
|
||||
GPIO(EN_PP1800_SENSOR, PIN(6, 7), GPIO_OUT_HIGH) /* Enable Power */
|
||||
GPIO(EN_PP1800_SENSOR, PIN(6, 7), GPIO_OUT_LOW) /* Enable Power */
|
||||
GPIO(ENABLE_BACKLIGHT_L, PIN(D, 3), GPIO_OUT_HIGH) /* Enable Backlight */
|
||||
GPIO(PCH_RSMRST_L, PIN(C, 2), GPIO_OUT_LOW) /* RSMRST# to SOC */
|
||||
GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_OUT_HIGH) /* Power Button to SOC */
|
||||
|
||||
Reference in New Issue
Block a user