From 9f5a873865806303ac2a98dfdf0de61a132f4911 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Wed, 9 Jul 2014 10:04:57 -0700 Subject: 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 BRANCH=none BUG=none TEST=make buildall Change-Id: I1ad3471600f1207986a6be9d8c3c627ab73796ac Reviewed-on: https://chromium-review.googlesource.com/207151 Reviewed-by: Yung-chieh Lo Reviewed-by: Vic Yang Commit-Queue: Vincent Palatin Tested-by: Vincent Palatin --- power/tegra.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'power/tegra.c') 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); -- cgit v1.2.1