Files
OpenCellular/include/power_button.h
Randall Spangler 990c8b39e1 Disable touchscreen when lid is closed and in S3
(Touchscreen was already disabled in S5)

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:9736
TEST=from console, 'gpioget touchscreen_resetn' in these cases:

1) system is off -> 0
2) system is on with lid open -> 1
3) system is on with lid closed -> 1
4) system is suspended with lid open -> 1
5) system is suspended with lid closed -> 1
6) system is shut back down -> 0
7) suspend system with lid open, THEN close lid -> 0

Change-Id: I5fc80b72ea9dcfbf11f5280d79ae805c2ef1b6df
2012-05-21 16:30:12 -07:00

29 lines
805 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 */