summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce <Bruce.Wan@quantatw.com>2016-03-16 19:39:03 +0800
committerChromeOS bot <3su6n15k.default@developer.gserviceaccount.com>2016-03-17 22:59:55 +0000
commit327a3c8463047583bf32117cab12fbbd39575870 (patch)
tree64ccd836c274c22c8aaf7b5412045bc6bfbcdbdc
parent58f817b7dc3ae604c9994560d11ec65f2faddf11 (diff)
downloadchrome-ec-327a3c8463047583bf32117cab12fbbd39575870.tar.gz
Reks: Touch panel control
Enable touch panel on S1, disable touch panel on S3 and S5. BUG=None BRANCH=firmware-reks-7287.133.B TEST=make buildall Change-Id: I17b120675245d0294cc8426395ac683c1cc10c03 Signed-off-by: Bruce.Wan <Bruce.Wan@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/332931 Reviewed-by: Shawn N <shawnn@chromium.org> Commit-Queue: Keith Tzeng <keith.tzeng@quantatw.com> Tested-by: Keith Tzeng <keith.tzeng@quantatw.com>
-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 */