diff options
author | Vic Yang <victoryang@chromium.org> | 2013-04-12 15:19:50 +0800 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-13 03:12:21 -0700 |
commit | 27459f8600d76d5a7ccc4cc1c396ef59cb26ff19 (patch) | |
tree | 978be3bad5447b358bd9681026174d9a53ed5a65 /include | |
parent | 2b3c02bf9f3b2ddda2ece73ca8291acf2000dd08 (diff) | |
download | chrome-ec-27459f8600d76d5a7ccc4cc1c396ef59cb26ff19.tar.gz |
Fix test compilation error for link
Now pingpong and mutex tests compile. Still need some more work to
handle the i8042-specific KEYPROTO task for keyboard tests.
BUG=chrome-os-partner:18598
TEST=Build tests for link
BRANCH=None
Change-Id: I9ee35d4edb811f17b9a81beb799484a07c0bef14
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/47981
Diffstat (limited to 'include')
-rw-r--r-- | include/chipset.h | 9 | ||||
-rw-r--r-- | include/keyboard_scan.h | 11 |
2 files changed, 19 insertions, 1 deletions
diff --git a/include/chipset.h b/include/chipset.h index d05eadec5a..bebd3f4553 100644 --- a/include/chipset.h +++ b/include/chipset.h @@ -51,7 +51,7 @@ static inline int chipset_in_state(int state_mask) } #endif - +#ifdef CONFIG_TASK_CHIPSET /** * Ask the chipset to exit the hard off state. * @@ -59,6 +59,9 @@ static inline int chipset_in_state(int state_mask) * state to begin with. */ void chipset_exit_hard_off(void); +#else +static inline void chipset_exit_hard_off(void) { } +#endif /** * Enable/disable CPU throttling. @@ -67,6 +70,7 @@ void chipset_exit_hard_off(void); */ void chipset_throttle_cpu(int throttle); +#ifdef CONFIG_TASK_CHIPSET /** * Immedaitely shut off power to main processor and chipset. * @@ -74,6 +78,9 @@ void chipset_throttle_cpu(int throttle); * critical. */ void chipset_force_shutdown(void); +#else +static inline void chipset_force_shutdown(void) { } +#endif /** * Reset the CPU and/or chipset. diff --git a/include/keyboard_scan.h b/include/keyboard_scan.h index e775477421..fb5cb5dde0 100644 --- a/include/keyboard_scan.h +++ b/include/keyboard_scan.h @@ -51,12 +51,19 @@ enum boot_key { BOOT_KEY_OTHER = -1, /* None of the above */ }; +#ifdef CONFIG_TASK_KEYSCAN /** * Return the key held down at boot time in addition to the keyboard-controlled * reset keys. Returns BOOT_KEY_OTHER if none of the keys specifically checked * was pressed, or reset was not caused by a keyboard-controlled reset. */ enum boot_key keyboard_scan_get_boot_key(void); +#else +static inline enum boot_key keyboard_scan_get_boot_key(void) +{ + return BOOT_KEY_NONE; +} +#endif /** * Return a pointer to the current debounced keyboard matrix state, which is @@ -64,10 +71,14 @@ enum boot_key keyboard_scan_get_boot_key(void); */ const uint8_t *keyboard_scan_get_state(void); +#ifdef CONFIG_TASK_KEYSCAN /** * Enables/disables keyboard matrix scan. */ void keyboard_scan_enable(int enable); +#else +static inline void keyboard_scan_enable(int enable) { } +#endif #ifdef CONFIG_KEYBOARD_SUPPRESS_NOISE /** |