summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/reks/board.c15
-rw-r--r--board/reks/gpio.inc2
2 files changed, 16 insertions, 1 deletions
diff --git a/board/reks/board.c b/board/reks/board.c
index 12f51f3541..cd869020a1 100644
--- a/board/reks/board.c
+++ b/board/reks/board.c
@@ -8,6 +8,7 @@
#include "button.h"
#include "charger.h"
#include "charge_state.h"
+#include "chipset.h"
#include "driver/temp_sensor/tmp432.h"
#include "extpower.h"
#include "gpio.h"
@@ -104,3 +105,17 @@ static void adc_pre_init(void)
gpio_config_module(MODULE_ADC, 1);
}
DECLARE_HOOK(HOOK_INIT, adc_pre_init, HOOK_PRIO_INIT_ADC - 1);
+
+/* Called on AP S3 -> S0 transition */
+static void board_chipset_resume(void)
+{
+ gpio_set_level(GPIO_TOUCHPANEL_PWREN, 1);
+}
+DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
+
+/* Called on AP S0 -> S3 transition */
+static void board_chipset_suspend(void)
+{
+ gpio_set_level(GPIO_TOUCHPANEL_PWREN, 0);
+}
+DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);
diff --git a/board/reks/gpio.inc b/board/reks/gpio.inc
index 166e82777d..9dac56b200 100644
--- a/board/reks/gpio.inc
+++ b/board/reks/gpio.inc
@@ -55,7 +55,7 @@ GPIO(DP_USB_C_HPD_Q, PIN(46), GPIO_OUT_HIGH) /* DP hot plug d
GPIO(OTG_SW_EN, PIN(50), GPIO_OUT_LOW) /* */
GPIO(PCH_SUS_STAT_L, PIN(51), GPIO_INT_FALLING) /* Signal to inform EC that SOC is entering low power state */
-GPIO(EC_ACDET_CTRL, PIN(52), GPIO_INPUT | GPIO_PULL_UP)
+GPIO(TOUCHPANEL_PWREN, PIN(52), GPIO_OUT_LOW)
GPIO(TRACKPAD_PWREN, PIN(53), GPIO_OUT_HIGH) /* Enable power for Track Pad */
GPIO(USB_OC0_L, PIN(55), GPIO_INT_FALLING) /* Over current signal of the BC1.2 charger to EC */
GPIO(EC_ADC1, PIN(57), GPIO_INPUT) /* EC_ADC1, TEMP_SENSOR_2 no_stuff */