Files
OpenCellular/include/switch.h
Randall Spangler 672057cb7e Split x86 power button logic out of switch.c
Power button logic is common across all platforms and is not
LM4-specific, so move it to its own module.  Switch.c will eventually
be moving to common/ and will common across all platforms (not just
x86), and splitting out the x86 power button logic is needed before
that too.

BUG=chrome-os-partner:18343
BRANCH=none
TEST=manual
     1) power on system with both lid and power button.
     2) power+refresh -> reboots
     3) power+refresh+esc -> recovery mode
     4) power+refresh+downarrow -> reboots, AP stays off
     5) toggling recovery GPIO via servo should generate SW debug output
        showing bit 0x10 toggling

Change-Id: I07714e2c035dceece66f90407983397d2697e7d5
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61780
2013-07-17 10:49:48 -07:00

26 lines
579 B
C

/* Copyright (c) 2013 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.
*/
/* Switch module for Chrome EC */
#ifndef __CROS_EC_SWITCH_H
#define __CROS_EC_SWITCH_H
#include "common.h"
#include "gpio.h"
#ifdef CONFIG_SWITCH
/**
* Interrupt handler for switch inputs.
*
* @param signal Signal which triggered the interrupt.
*/
void switch_interrupt(enum gpio_signal signal);
#else
#define switch_interrupt NULL
#endif /* CONFIG_SWITCH */
#endif /* __CROS_EC_SWITCH_H */