mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 12:52:26 +00:00
Keyboard recovery used to persist until the next time the EC was reset. It should release the next time the user turns on the system via the lid or power button. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:10034 TEST=manual 1. power system on normally. not in recovery. 2. press Power+Esc+Refresh. System turns on into recovery. 3. shut system down 4. power system on with lid-open. System boots normally. 5. repeat steps 2-3, then power system on with power button. System boots normally. Change-Id: I455c7191d128614629c50ba27d7ef977e414fe90 Reviewed-on: https://gerrit.chromium.org/gerrit/24409 Commit-Ready: Randall Spangler <rspangler@chromium.org> Tested-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
36 lines
1.0 KiB
C
36 lines
1.0 KiB
C
/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Power button module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_POWER_BUTTON_H
|
|
#define __CROS_EC_POWER_BUTTON_H
|
|
|
|
#include "common.h"
|
|
#include "gpio.h"
|
|
|
|
/* Interrupt handler for the power button and lid switch. Passed the signal
|
|
* which triggered the interrupt. */
|
|
void power_button_interrupt(enum gpio_signal signal);
|
|
|
|
/* Power button task */
|
|
void power_button_task(void);
|
|
|
|
/* Return non-zero if AC power is present. */
|
|
int power_ac_present(void);
|
|
|
|
/* Return non-zero if lid is open. Uses the debounced lid state, not the raw
|
|
* signal from the GPIO. */
|
|
int power_lid_open_debounced(void);
|
|
|
|
/* Return non-zero if the recovery button is pressed. */
|
|
int power_recovery_pressed(void);
|
|
|
|
/* Set the state of the recovery button. Called by the keyboard scanner at
|
|
* init if the keyboard recovery combo was pressed. */
|
|
void power_set_recovery_pressed(int pressed);
|
|
|
|
#endif /* __CROS_EC_POWER_BUTTON_H */
|