summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLouis Yung-Chieh Lo <yjlou@chromium.org>2012-02-10 12:11:42 +0800
committerLouis Yung-Chieh Lo <yjlou@chromium.org>2012-02-10 12:11:42 +0800
commit186c81dcac9ae96a1ace3ad5bf147fbf8fd35c50 (patch)
tree4a98e4776c47536d90769705c3dfaca8a34ce099 /include
parent7c01418f9c0a9c9a01bdb25d9c4a5884ec157501 (diff)
downloadchrome-ec-186c81dcac9ae96a1ace3ad5bf147fbf8fd35c50.tar.gz
Send scan code to host when power button is pressed/released.
But only if the system is in S0. Approved at internal gerrit: 11595. BUG=none TEST=tested on bds.
Diffstat (limited to 'include')
-rw-r--r--include/keyboard.h5
-rw-r--r--include/x86_power.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/include/keyboard.h b/include/keyboard.h
index 98394e63c7..b00ebfe05e 100644
--- a/include/keyboard.h
+++ b/include/keyboard.h
@@ -50,6 +50,11 @@ int handle_keyboard_data(uint8_t data, uint8_t *output);
int handle_keyboard_command(uint8_t command, uint8_t *output);
+/* Send make/break code of power button to host.
+ */
+void keyboard_set_power_button(int pressed);
+
+
/* Register the board-specific keyboard matrix translation function.
* The callback function accepts col/row and returns the scan code.
*
diff --git a/include/x86_power.h b/include/x86_power.h
index ce28e1b571..2c2ff16357 100644
--- a/include/x86_power.h
+++ b/include/x86_power.h
@@ -17,4 +17,8 @@ int x86_power_init(void);
/* Interrupt handler for input GPIOs */
void x86_power_interrupt(enum gpio_signal signal);
+/* Returns true if the system is in S0. */
+int x86_power_in_S0(void);
+
+
#endif /* __CROS_EC_X86_POWER_H */