diff options
author | Vic Yang <victoryang@chromium.org> | 2014-06-18 11:14:25 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-06-19 03:25:12 +0000 |
commit | 94acd01e0c4e9cb9c31c6b6d332d24bb352d669c (patch) | |
tree | d60fb142648bac44a0b255112f5d36d1ad491cd5 /board/keyborg/master_slave.h | |
parent | 6c8e451ff01d046a953ee99a2911b46732361b2b (diff) | |
download | chrome-ec-94acd01e0c4e9cb9c31c6b6d332d24bb352d669c.tar.gz |
Keyborg: implement methods needed for touch wake
In order to wake the chips from STOP/SLEEP mode with a touch, we need to
put the two chips in correct state before going into STOP/SLEEP mode.
Also, when one of the chips wakes up, it needs to wake the other chip
with GPIO interrupt.
This CL implements the necessary methods and also adds a sample routine
that put the chips in STOP mode and wait for a touch using the
implemented methods.
BUG=None
TEST=Build and boot. Touch the panel and see the response in console.
BRANCH=None
Change-Id: Ia5f7df8b550ee2459bcae1840f8a2717c8d947ce
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/204482
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/keyborg/master_slave.h')
-rw-r--r-- | board/keyborg/master_slave.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/keyborg/master_slave.h b/board/keyborg/master_slave.h index 8cc1c8ce64..7312799158 100644 --- a/board/keyborg/master_slave.h +++ b/board/keyborg/master_slave.h @@ -29,6 +29,17 @@ int master_slave_is_master(void); int master_slave_sync_impl(const char *filename, int line, int timeout_ms); /** + * Enable/disable master-slave interrupt. Master-slave interrupt is + * implemented using SYNC1/SYNC2 signal, so this is assuming the master + * and the slave are in sync waiting for interrupt. + */ +void master_slave_enable_interrupt(void); +void master_slave_disable_interrupt(void); + +/* Interrupt the other chip with a 1-ms pulse. */ +void master_slave_wake_other(void); + +/** * Identify this chip and shake hands with the other chip. * * @return EC_SUCCESS, or non-zero if any error. |