Files
OpenCellular/common
David Hendricks b8eefd91c1 stm32: assert/de-assert GPIO_PMIC_PWRON_L with keyboard power event
This sets the PMIC_PWRON_L signal to correspond with the keyboard
power button state.

BUG=chrome-os-partner:9821
TEST=Tested on Lucas (see notes below)

Signed-off-by: David Hendricks <dhendrix@chromium.org>

1. AC power plugged in, AP off, EC booted
> gpioget PMIC_PWRON_L
  1* PMIC_PWRON_L

2. AP running, press and release power button (should see screen zoom
   out and then back in, but I don't have a monitor...)

2a. AP running, power button not pressed
> gpioget PMIC_PWRON_L
  1  PMIC_PWRON_L

2b. Press power button
> Waiting for long power press 280507864
> gpioget PMIC_PWRON_L
  0* PMIC_PWRON_L

2c. release power button before 8s
> Cancel power off
> gpioget PMIC_PWRON_L
  1* PMIC_PWRON_L

3. From AP off state, press and hold keyboard power button
> gpioget PMIC_PWRON_L
  0* PMIC_PWRON_L

After 8s, we see:
Timeout waiting for GPIO 0/KB_PWR_ON_L
Power button was not released in time
Shutdown complete.

4. AP on, press and hold keyboard power button
> gpioget PMIC_PWRON_L
  1  PMIC_PWRON_L
> Waiting for long power press 654024769
> gpioget PMIC_PWRON_L
  0* PMIC_PWRON_L
> Power off after long press now=654025073, 0
ending loop 2
Shutdown complete. <-- Note: This message comes from power_off() which
                       also de-asserts PMIC_PWRON_L
> gpioget PMIC_PWRON_L
  1* PMIC_PWRON_L

Change-Id: I6955771707ecea2926570be0e8bd77ebddbca4d4
2012-05-29 13:17:42 -07:00
..
2012-05-17 09:30:38 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-25 13:34:06 -07:00
2012-05-14 13:35:03 -07:00
2012-05-22 14:22:13 -07:00
2012-05-25 13:34:06 -07:00