diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-03-15 12:27:27 -0700 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-03-15 12:42:11 -0700 |
commit | c72f66c050b7754c36436583272965b9ca4fd850 (patch) | |
tree | 8f532eeb86274628a542d38ccd2bc6012a958e38 /include/lpc.h | |
parent | 38d1b2e8bad5b9d4698963dbb63684aacbd23ec0 (diff) | |
download | chrome-ec-c72f66c050b7754c36436583272965b9ca4fd850.tar.gz |
Add wake signal to PCH
This works similar to SCI/SMI events, but triggers a separate
level-sensitive signal to the PCH instead.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8514
TEST=manual
From EC console:
gpioget PCH_WAKEn --> should be 1
hostevent wake 0x1
close lid switch (with magnet)
hostevent -> should show wake mask 0x1, raw events 0x1
gpioget PCH_WAKEn --> should be 0
hostevent clear 0x1
hostevent -> should show raw events 0
gpioget PCH_WAKEn --> should be 1
Change-Id: I29832c1dc30239a98987578f07dfeb25791dde11
Diffstat (limited to 'include/lpc.h')
-rw-r--r-- | include/lpc.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/include/lpc.h b/include/lpc.h index b7163f3c34..17a78cc9cb 100644 --- a/include/lpc.h +++ b/include/lpc.h @@ -48,6 +48,13 @@ int lpc_comx_get_char(void); /* Puts a character to the COMx LPC interface. */ void lpc_comx_put_char(int c); +/* Types of host events */ +enum lpc_host_event_type { + LPC_HOST_EVENT_SMI = 0, + LPC_HOST_EVENT_SCI, + LPC_HOST_EVENT_WAKE, +}; + /* Set one or more SCI/SMI event bits. */ void lpc_set_host_events(uint32_t mask); @@ -57,10 +64,10 @@ void lpc_clear_host_events(uint32_t mask); /* Return the raw SCI/SMI event state. */ uint32_t lpc_get_host_events(void); -/* Set the SMI (sci=0) or SMI (sci=1) event mask. */ -void lpc_set_host_event_mask(int sci, uint32_t mask); +/* Set the event mask for the specified event type. */ +void lpc_set_host_event_mask(enum lpc_host_event_type type, uint32_t mask); -/* Return the SMI (sci=0) or SMI (sci=1) event mask. */ -uint32_t lpc_get_host_event_mask(int sci); +/* Return the event mask for the specified event type. */ +uint32_t lpc_get_host_event_mask(enum lpc_host_event_type type); #endif /* __CROS_EC_LPC_H */ |