diff options
author | Raul E Rangel <rrangel@chromium.org> | 2020-02-27 15:08:32 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-03-02 06:55:23 +0000 |
commit | 5c04c6c6a45da6ee226249ef8ec6859931d9b26b (patch) | |
tree | bdfbbfdbdf2d8bccb9bbf56e3e93ac10eaac27ba /chip | |
parent | 1066c43cb64399e75d810cd0b6d126c0d153407d (diff) | |
download | chrome-ec-5c04c6c6a45da6ee226249ef8ec6859931d9b26b.tar.gz |
include/lpc.h: Expose lpc_aux_put_char
* Expose lpc_aux_put_char so we can call it from common/keyboard_8042.
* Renamed lpc_mouse_put_char to lpc_aux_put_char so it's more generic.
* Added the send_irq parameter for parity with lpc_keyboard_put_char.
BUG=b:145575366
BRANCH=none
TEST=Verified it builds
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I61854ed7c9b9ad1c50e55735747cfb25ca15762b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2079694
Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'chip')
-rw-r--r-- | chip/npcx/lpc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/chip/npcx/lpc.c b/chip/npcx/lpc.c index 1bcb5571b1..4e297654b8 100644 --- a/chip/npcx/lpc.c +++ b/chip/npcx/lpc.c @@ -314,12 +314,17 @@ void lpc_keyboard_put_char(uint8_t chr, int send_irq) } } -/* Put a char to host buffer by HIMDO */ -void lpc_mouse_put_char(uint8_t chr) +/* Put an aux char to host buffer by HIMDO and assert status bit 5. */ +void lpc_aux_put_char(uint8_t chr, int send_irq) { + if (send_irq) + SET_BIT(NPCX_HICTRL, NPCX_HICTRL_OBFMIE); + else + CLEAR_BIT(NPCX_HICTRL, NPCX_HICTRL_OBFMIE); + NPCX_HIKMST |= I8042_AUX_DATA; NPCX_HIMDO = chr; - CPRINTS("Mouse put %02x", chr); + CPRINTS("AUX put %02x", chr); /* Enable OBE interrupt to detect host read data out */ SET_BIT(NPCX_HICTRL, NPCX_HICTRL_OBECIE); |