mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 10:45:22 +00:00
Haswell: Add control for touchscreen reset
BUG=chrome-os-partner:22076 BRANCH=peppy TEST=Manual. Verify touchscreen operational in S0. Change-Id: Ife2d4e11142195bddf202933430ec8af243b1309 Signed-off-by: Dave Parker <dparker@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/167150 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
fe0b6c1acd
commit
2c16da8e91
@@ -13,6 +13,7 @@
|
||||
#include "gpio.h"
|
||||
#include "hooks.h"
|
||||
#include "host_command.h"
|
||||
#include "lid_switch.h"
|
||||
#include "system.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
@@ -157,6 +158,14 @@ enum x86_state x86_handle_state(enum x86_state state)
|
||||
break;
|
||||
|
||||
case X86_S3:
|
||||
/*
|
||||
* If lid is closed; hold touchscreen in reset to cut power
|
||||
* usage. If lid is open, take touchscreen out of reset so it
|
||||
* can wake the processor. Chipset task is awakened on lid
|
||||
* switch transitions.
|
||||
*/
|
||||
gpio_set_level(GPIO_TOUCHSCREEN_RESET_L, lid_is_open());
|
||||
|
||||
/* Check for state transitions */
|
||||
if (!x86_has_signals(IN_PGOOD_S3)) {
|
||||
/* Required rail went away */
|
||||
@@ -247,12 +256,20 @@ enum x86_state x86_handle_state(enum x86_state state)
|
||||
/* Enable wireless */
|
||||
wireless_enable(EC_WIRELESS_SWITCH_ALL);
|
||||
|
||||
/*
|
||||
* Make sure touchscreen is out if reset (even if the lid is
|
||||
* still closed); it may have been turned off if the lid was
|
||||
* closed in S3.
|
||||
*/
|
||||
gpio_set_level(GPIO_TOUCHSCREEN_RESET_L, 1);
|
||||
|
||||
/* Wait for non-core power rails good */
|
||||
if (x86_wait_signals(IN_PGOOD_S0)) {
|
||||
chipset_force_shutdown();
|
||||
wireless_enable(0);
|
||||
gpio_set_level(GPIO_EC_EDP_VDD_EN, 0);
|
||||
gpio_set_level(GPIO_PP3300_DX_EN, 0);
|
||||
gpio_set_level(GPIO_TOUCHSCREEN_RESET_L, 0);
|
||||
return X86_S3;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user