mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
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
26 lines
579 B
C
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 */
|