Move gaia event handler declarations to gaia_power.h

This removes duplicated code in 3 different board.c files.

No functional changes, just moving declarations.

BUG=chrome-os-partner:18343
BRANCH=none
TEST=build daisy,spring,snow

Change-Id: Ie6266dca7d7d160e154fce1a09452e5cc9a1095c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/45898
This commit is contained in:
Randall Spangler
2013-03-19 15:11:21 -07:00
committed by ChromeBot
parent 78b0e9863d
commit f8393fab2c
5 changed files with 34 additions and 33 deletions

View File

@@ -7,6 +7,7 @@
#include "common.h"
#include "dma.h"
#include "extpower.h"
#include "gaia_power.h"
#include "gpio.h"
#include "i2c.h"
#include "keyboard_scan.h"
@@ -33,17 +34,6 @@
#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH)
#define GPIO_KB_OUTPUT (GPIO_OUTPUT | GPIO_PULL_UP | GPIO_OPEN_DRAIN)
/* GPIO interrupt handlers prototypes */
#ifdef CONFIG_CHIPSET_GAIA
void gaia_power_event(enum gpio_signal signal);
void gaia_suspend_event(enum gpio_signal signal);
void gaia_lid_event(enum gpio_signal signal);
#else
#define gaia_power_event NULL
#define gaia_suspend_event NULL
#define gaia_lid_event NULL
#endif
/* GPIO signal list. Must match order from enum gpio_signal. */
const struct gpio_info gpio_list[GPIO_COUNT] = {
/* Inputs with interrupt handlers are first for efficiency */

View File

@@ -9,6 +9,7 @@
#include "console.h"
#include "dma.h"
#include "extpower.h"
#include "gaia_power.h"
#include "gpio.h"
#include "hooks.h"
#include "i2c.h"
@@ -29,17 +30,6 @@
#define HARD_RESET_TIMEOUT_MS 5
/* GPIO interrupt handlers prototypes */
#ifdef CONFIG_CHIPSET_GAIA
void gaia_power_event(enum gpio_signal signal);
void gaia_suspend_event(enum gpio_signal signal);
void gaia_lid_event(enum gpio_signal signal);
#else
#define gaia_power_event NULL
#define gaia_suspend_event NULL
#define gaia_lid_event NULL
#endif
/* GPIO signal list. Must match order from enum gpio_signal. */
const struct gpio_info gpio_list[GPIO_COUNT] = {
/* Inputs with interrupt handlers are first for efficiency */

View File

@@ -10,6 +10,7 @@
#include "console.h"
#include "dma.h"
#include "extpower.h"
#include "gaia_power.h"
#include "gpio.h"
#include "hooks.h"
#include "host_command.h"
@@ -46,17 +47,6 @@ uint8_t breathing_prog[] = {0x41, 0xff, /* 0x80 -> 0x0 */
0x7f, 0x00,
0x00, 0x00}; /* Repeat */
/* GPIO interrupt handlers prototypes */
#ifdef CONFIG_CHIPSET_GAIA
void gaia_power_event(enum gpio_signal signal);
void gaia_suspend_event(enum gpio_signal signal);
void gaia_lid_event(enum gpio_signal signal);
#else
#define gaia_power_event NULL
#define gaia_suspend_event NULL
#define gaia_lid_event NULL
#endif
void usb_charge_interrupt(enum gpio_signal signal);
/* GPIO signal list. Must match order from enum gpio_signal. */

View File

@@ -27,6 +27,7 @@
#include "chipset.h" /* This module implements chipset functions too */
#include "common.h"
#include "console.h"
#include "gaia_power.h"
#include "gpio.h"
#include "hooks.h"
#include "keyboard_scan.h"

30
include/gaia_power.h Normal file
View File

@@ -0,0 +1,30 @@
/* 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.
*/
/* Gaia power module for Chrome EC */
#ifndef __CROS_EC_GAIA_POWER_H
#define __CROS_EC_GAIA_POWER_H
#include "gpio.h"
#ifdef CONFIG_CHIPSET_GAIA
/**
* Interrupt handlers for Gaia chipset GPIOs.
*/
void gaia_power_event(enum gpio_signal signal);
void gaia_lid_event(enum gpio_signal signal);
void gaia_suspend_event(enum gpio_signal signal);
#else
#define gaia_power_event NULL
#define gaia_suspend_event NULL
#define gaia_lid_event NULL
#endif
#endif /* __CROS_EC_GAIA_POWER_H */