summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorAlexandru M Stan <amstan@chromium.org>2014-08-20 10:10:59 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-08-21 08:02:16 +0000
commitf191f051da1caa8d2fdf8e776daaad0a00669174 (patch)
tree21521206aba90e47961b54c49da3e6f362693c6c /power
parent0539cc2ed5692fd17a120ba6eed8c5ece67be82b (diff)
downloadchrome-ec-f191f051da1caa8d2fdf8e776daaad0a00669174.tar.gz
Veyron: Removing some stale tegra code
There's no point in having these delays, they're not applicable to Veyron. BUG=None TEST=Everything should work the same. BRANCH=None Change-Id: Icc2aebae1a497dd4f46579c23e36750feca6d67a Signed-off-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/213248 Reviewed-by: Yung-chieh Lo <yjlou@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/rockchip.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/power/rockchip.c b/power/rockchip.c
index aa0f2f8a78..4075f8b570 100644
--- a/power/rockchip.c
+++ b/power/rockchip.c
@@ -53,19 +53,6 @@
#define DELAY_FORCE_SHUTDOWN (8 * SECOND)
/*
- * The minimum time to assert the PMIC PWRON pin is 20ms.
- * Give it longer to ensure the PMIC doesn't lose it.
- */
-#define PMIC_PWRON_DEBOUNCE_TIME (200 * MSEC * 3)
-
-/*
- * The minimum time to assert the PMIC THERM pin is 32us. However,
- * it needs to be extended to about 50ms to let the 5V rail
- * dissipate fully.
- */
-#define PMIC_THERM_HOLD_TIME (50 * MSEC)
-
-/*
* If the power key is pressed to turn on, then held for this long, we
* power off.
*
@@ -130,8 +117,6 @@ static void set_ap_reset(int asserted)
/**
* Set the PMIC PWREN signal.
*
- * Note that asserting requires holding for PMIC_PWRON_DEBOUNCE_TIME.
- *
* @param asserted Assert (=1) or deassert (=0) the signal.
*/
static void set_pmic_pwren(int asserted)
@@ -183,7 +168,6 @@ static int check_for_power_off_event(void)
now = get_time();
if (pressed) {
set_pmic_pwren(1);
- usleep(PMIC_PWRON_DEBOUNCE_TIME);
if (!power_button_was_pressed) {
power_off_deadline.val = now.val + DELAY_FORCE_SHUTDOWN;
@@ -383,9 +367,8 @@ static void power_on(void)
* until AP running
*/
gpio_set_flags(GPIO_SPI1_NSS, GPIO_INPUT);
- /* Push the power button */
+
set_pmic_pwren(1);
- usleep(PMIC_PWRON_DEBOUNCE_TIME);
gpio_set_flags(GPIO_SPI1_NSS, GPIO_INPUT | GPIO_INT_BOTH
| GPIO_PULL_UP);
disable_sleep(SLEEP_MASK_AP_RUN);
@@ -445,8 +428,7 @@ static void power_off(void)
lid_opened = 0;
enable_sleep(SLEEP_MASK_AP_RUN);
powerled_set_state(POWERLED_STATE_OFF);
- /* Wait POWER GOOD pin to low */
- usleep(PMIC_THERM_HOLD_TIME);
+
CPRINTS("power shutdown complete");
}