/* 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 */