diff options
author | Douglas Anderson <dianders@chromium.org> | 2016-07-08 04:39:19 +0000 |
---|---|---|
committer | Douglas Anderson <dianders@chromium.org> | 2016-07-08 04:39:33 +0000 |
commit | 8c52bb8d3bedbd8c0535a3fcbd1016c726c9ba85 (patch) | |
tree | a825e99a529d7bb756a6364eda034e9396b34c5f | |
parent | d225611cbbd318758baf981351dabe847d43d3f2 (diff) | |
download | chrome-ec-8c52bb8d3bedbd8c0535a3fcbd1016c726c9ba85.tar.gz |
Revert "mkbp: Add mkbp_update_button()."
This reverts commit 085084e72e38bf024c57219a187737de5c51adcc.
This does nothing useful yet and no kernel changes use it.
We don't want it in the bundle.
Change-Id: I21f0064dc9fb9c5f1156981ff408f00dad51386b
Reviewed-on: https://chromium-review.googlesource.com/359071
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
-rw-r--r-- | common/button.c | 4 | ||||
-rw-r--r-- | common/keyboard_mkbp.c | 35 | ||||
-rw-r--r-- | common/power_button.c | 6 | ||||
-rw-r--r-- | include/keyboard_mkbp.h | 8 |
4 files changed, 0 insertions, 53 deletions
diff --git a/common/button.c b/common/button.c index ce8f344a26..38f5a61403 100644 --- a/common/button.c +++ b/common/button.c @@ -85,10 +85,6 @@ static void button_change_deferred(void) keyboard_update_button(buttons[i].type, new_pressed); #endif -#ifdef CONFIG_KEYBOARD_PROTOCOL_MKBP - mkbp_update_button(buttons[i].type, - new_pressed); -#endif } /* Clear the debounce time to stop checking it */ diff --git a/common/keyboard_mkbp.c b/common/keyboard_mkbp.c index bf79ab5067..0e5f766a08 100644 --- a/common/keyboard_mkbp.c +++ b/common/keyboard_mkbp.c @@ -6,7 +6,6 @@ */ #include "atomic.h" -#include "button.h" #include "chipset.h" #include "console.h" #include "gpio.h" @@ -159,40 +158,6 @@ kb_fifo_push_done: return ret; } -void mkbp_update_button(enum keyboard_button_type button, int is_pressed) -{ - struct mkbp_btn_data d; - static uint8_t buttons; - - switch (button) { - case KEYBOARD_BUTTON_POWER: - buttons &= ~(1 << POWER_BUTTON); - buttons |= (is_pressed << POWER_BUTTON); - break; - - case KEYBOARD_BUTTON_VOLUME_UP: - buttons &= ~(1 << VOL_UP); - buttons |= (is_pressed << VOL_UP); - break; - - case KEYBOARD_BUTTON_VOLUME_DOWN: - buttons &= ~(1 << VOL_DOWN); - buttons |= (is_pressed << VOL_DOWN); - break; - - default: - /* ignored. */ - return; - } - - CPRINTS("buttons: %x", buttons); - - /* Add the new state to the FIFO. */ - memcpy(d.cookie, MKBP_BUTTON_COOKIE, MKBP_BUTTON_COOKIE_LEN); - d.state = buttons; - keyboard_fifo_add((uint8_t *)&d); -} - #ifdef CONFIG_MKBP_EVENT static int keyboard_get_next_event(uint8_t *out) { diff --git a/common/power_button.c b/common/power_button.c index 2f237401b1..747be2381e 100644 --- a/common/power_button.c +++ b/common/power_button.c @@ -5,14 +5,12 @@ /* Power button module for Chrome EC */ -#include "button.h" #include "common.h" #include "console.h" #include "gpio.h" #include "hooks.h" #include "host_command.h" #include "keyboard_scan.h" -#include "keyboard_mkbp.h" #include "lid_switch.h" #include "power_button.h" #include "task.h" @@ -143,10 +141,6 @@ static void power_button_change_deferred(void) /* Notify host if power button has been pressed */ if (new_pressed) host_set_single_event(EC_HOST_EVENT_POWER_BUTTON); - -#ifdef CONFIG_KEYBOARD_PROTOCOL_MKBP - mkbp_update_button(KEYBOARD_BUTTON_POWER, new_pressed); -#endif } DECLARE_DEFERRED(power_button_change_deferred); diff --git a/include/keyboard_mkbp.h b/include/keyboard_mkbp.h index 069a2fb1cc..5ea3c54593 100644 --- a/include/keyboard_mkbp.h +++ b/include/keyboard_mkbp.h @@ -26,12 +26,4 @@ void keyboard_send_battery_key(void); static inline void keyboard_send_battery_key(void) { } #endif -/** - * Update the state of non-matrixed buttons. - * - * @param button The button that changed. - * @param is_pressed Whether the button is now pressed. - */ -void mkbp_update_button(enum keyboard_button_type button, int is_pressed); - #endif /* __CROS_EC_KEYBOARD_MKBP_H */ |