Files
OpenCellular/include/power_button.h
Randall Spangler 7b155fb8ac Refactor boot key detection
Keyboard scan module now owns the recovery key state on all platforms.

And clean up a few comments to linux kernel style

BUG=chrome-os-partner:10890
TEST=manual
- Power on system.  Should boot normally.
- Power+Refresh+D.  Should turn dev switch on.
- Power+Refresh+F.  Should turn dev switch off.
- Power+Esc.  Should reboot system.  Power button should power on normally.
- Power+Refresh+Esc.  Should power on into recovery mode.
- Then press power to shut system down.
- Power button should power on normally (not back into recovery mode).

Change-Id: I4d16e1e8b039efeacbd41e8acec115844bc8457d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/26147
Reviewed-by: Simon Glass <sjg@chromium.org>
2012-06-26 17:01:52 -07:00

33 lines
813 B
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);
#endif /* __CROS_EC_POWER_BUTTON_H */