diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-18 10:38:07 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-21 21:10:36 +0000 |
commit | d9530449fd75650a53d2ee8d9cfdc8ef063781b5 (patch) | |
tree | e04f409f01e555c6a05b228a965726ab055c35a6 /include | |
parent | 15e2fa02fdae240411df7a4e3298b988736a4499 (diff) | |
download | chrome-ec-d9530449fd75650a53d2ee8d9cfdc8ef063781b5.tar.gz |
cleanup: Consolidate power interrupts
Every chipset had its own header file just to declare a GPIO interrupt
handler. Since this seems to be a common feature of the power
interface, make a standard power_interrupt() API provided by
chipset.h. This lets us get rid of 4 include files, and makes it
easier to add more chipsets in the future.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=build all boards; pass unit tests
Change-Id: I1fc5612d42625ea46e0a8e16a83085b66d476664
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173745
Diffstat (limited to 'include')
-rw-r--r-- | include/chipset.h | 7 | ||||
-rw-r--r-- | include/chipset_haswell.h | 20 | ||||
-rw-r--r-- | include/chipset_ivybridge.h | 20 | ||||
-rw-r--r-- | include/gaia_power.h | 28 | ||||
-rw-r--r-- | include/tegra_power.h | 28 |
5 files changed, 7 insertions, 96 deletions
diff --git a/include/chipset.h b/include/chipset.h index ddf4eb3db0..728a6be4a4 100644 --- a/include/chipset.h +++ b/include/chipset.h @@ -75,6 +75,11 @@ void chipset_force_shutdown(void); */ void chipset_reset(int cold_reset); +/** + * Interrupt handler for power GPIO inputs. + */ +void power_interrupt(enum gpio_signal signal); + #else /* !HAS_TASK_CHIPSET */ /* * Allow other modules to compile if the chipset module is disabled. This is @@ -91,6 +96,8 @@ static inline void chipset_throttle_cpu(int throttle) { } static inline void chipset_force_shutdown(void) { } static inline void chipset_reset(int cold_reset) { } +#define power_interrupt NULL + #endif /* !HAS_TASK_CHIPSET */ #endif /* __CROS_EC_CHIPSET_H */ diff --git a/include/chipset_haswell.h b/include/chipset_haswell.h deleted file mode 100644 index 5a4eaf9dc6..0000000000 --- a/include/chipset_haswell.h +++ /dev/null @@ -1,20 +0,0 @@ -/* 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. - */ - -/* Haswell chipset interface */ - -#ifndef __CROS_EC_CHIPSET_HASWELL_H -#define __CROS_EC_CHIPSET_HASWELL_H - -/** - * Interrupt handler for Haswell-specific GPIOs. - */ -#ifdef CONFIG_CHIPSET_HASWELL -void haswell_interrupt(enum gpio_signal signal); -#else -#define haswell_interrupt NULL -#endif - -#endif diff --git a/include/chipset_ivybridge.h b/include/chipset_ivybridge.h deleted file mode 100644 index af752a9f97..0000000000 --- a/include/chipset_ivybridge.h +++ /dev/null @@ -1,20 +0,0 @@ -/* 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. - */ - -/* Ivy bridge chipset interface */ - -#ifndef __CROS_EC_CHIPSET_IVYBRIDGE_H -#define __CROS_EC_CHIPSET_IVYBRIDGE_H - -/** - * Interrupt handler for Ivy Bridge-specific GPIOs. - */ -#ifdef CONFIG_CHIPSET_IVYBRIDGE -void ivybridge_interrupt(enum gpio_signal signal); -#else -#define ivybridge_interrupt NULL -#endif - -#endif diff --git a/include/gaia_power.h b/include/gaia_power.h deleted file mode 100644 index 4e44e66f2f..0000000000 --- a/include/gaia_power.h +++ /dev/null @@ -1,28 +0,0 @@ -/* 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_suspend_event(enum gpio_signal signal); - -#else - -#define gaia_power_event NULL -#define gaia_suspend_event NULL - -#endif - -#endif /* __CROS_EC_GAIA_POWER_H */ diff --git a/include/tegra_power.h b/include/tegra_power.h deleted file mode 100644 index 9b02a9feaf..0000000000 --- a/include/tegra_power.h +++ /dev/null @@ -1,28 +0,0 @@ -/* 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. - */ - -/* Tegra power module for Chrome EC */ - -#ifndef __CROS_EC_TEGRA_POWER_H -#define __CROS_EC_TEGRA_POWER_H - -#include "gpio.h" - -#ifdef CONFIG_CHIPSET_TEGRA - -/** - * Interrupt handlers for Tegra chipset GPIOs. - */ -void tegra_power_event(enum gpio_signal signal); -void tegra_suspend_event(enum gpio_signal signal); - -#else - -#define tegra_power_event NULL -#define tegra_suspend_event NULL - -#endif - -#endif /* __CROS_EC_TEGRA_POWER_H */ |