summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palatin <vpalatin@chromium.org>2014-07-09 10:04:57 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-10 21:17:47 +0000
commit9f5a873865806303ac2a98dfdf0de61a132f4911 (patch)
treebbf13eb0fa3e599f2e39b0516eba97171d33a716
parentc14b0644e356c8edacdd2a8d0a070fbbc4c23b4c (diff)
downloadchrome-ec-9f5a873865806303ac2a98dfdf0de61a132f4911.tar.gz
tegra: use power signal abstraction to access suspend GPIO
Use the power signal list abstraction everywhere to access the SUSPEND_L GPIO. This is preparatory work for Ryu, so we can change the suspend GPIO name and active level. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=none TEST=make buildall Change-Id: I1ad3471600f1207986a6be9d8c3c627ab73796ac Reviewed-on: https://chromium-review.googlesource.com/207151 Reviewed-by: Yung-chieh Lo <yjlou@chromium.org> Reviewed-by: Vic Yang <victoryang@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org>
-rw-r--r--power/tegra.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/power/tegra.c b/power/tegra.c
index 37db5cb997..a52ee268e6 100644
--- a/power/tegra.c
+++ b/power/tegra.c
@@ -365,8 +365,8 @@ static void power_on(void)
uint64_t t;
/* Set pull-up and enable interrupt */
- gpio_set_flags(GPIO_SUSPEND_L, GPIO_INPUT | GPIO_PULL_UP |
- GPIO_INT_BOTH);
+ gpio_set_flags(power_signal_list[TEGRA_SUSPEND_ASSERTED].gpio,
+ GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH);
/* Make sure we de-assert the PMI_THERM_L and AP_RESET_L pin. */
set_pmic_therm(0);
@@ -445,7 +445,8 @@ static void power_off(void)
chipset_turn_off_power_rails();
/* Change SUSPEND_L pin to high-Z to reduce power draw. */
- gpio_set_flags(GPIO_SUSPEND_L, GPIO_INPUT);
+ gpio_set_flags(power_signal_list[TEGRA_SUSPEND_ASSERTED].gpio,
+ GPIO_INPUT);
lid_opened = 0;
enable_sleep(SLEEP_MASK_AP_RUN);