summaryrefslogtreecommitdiff
path: root/include/device_state.h
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2016-08-18 18:35:45 -0700
committerMary Ruthven <mruthven@chromium.org>2016-09-22 18:04:57 +0000
commit96b7e491e80a4cd7a419fa4872dcf7146fc95cf3 (patch)
tree3fd5d717eba78c3d6e8c73bd8e2a4bbeed942e71 /include/device_state.h
parentb9f5a3d6baae84950f5ff0c4f7c588e55944818a (diff)
downloadchrome-ec-96b7e491e80a4cd7a419fa4872dcf7146fc95cf3.tar.gz
cr50: notify chipset hooks when the AP state changes
Cr50 monitors UART1 RX to sense the state of the AP. This signal can be used to tell if it is in S0. If the signal is pulled up then the AP is on. If it is not pulled up then the AP is not in S0. This change notifies HOOK_CHIPSET_SUSPEND when UART1 RX is not pulled up, and then notifies HOOK_CHIPSET_RESUME when the signal is high again. The AP usb can be disabled during suspend, so this change changes the hook that triggers disabling the AP usb to be attached to HOOK_CHIPSET_SUSPEND instead of HOOK_CHIPSET_RESUME. BUG=chrome-os-partner:55747 BRANCH=none TEST=buildall Change-Id: I47fb38a4bbcd72424ec2535d61e87f820cf1bcd7 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/383978 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'include/device_state.h')
-rw-r--r--include/device_state.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/device_state.h b/include/device_state.h
index 1ad78f002c..379cdb2f47 100644
--- a/include/device_state.h
+++ b/include/device_state.h
@@ -19,6 +19,7 @@ enum device_state {
struct device_config {
const char *name; /* Device name */
enum device_state state; /* Device status */
+ enum device_state last_known_state; /* Either off or on */
/* Deferred handler to detect power off */
const struct deferred_data *deferred;
enum gpio_signal detect; /* GPIO detecting power on */
@@ -41,11 +42,4 @@ void device_set_state(enum device_type device, enum device_state state);
/* Update the device state based on the device gpios */
void board_update_device_state(enum device_type device);
-
-/**
- * Enables or disables all device gpio interrupts
- *
- * @param enable enable or disable detection
- */
-void device_detect_state_enable(int enable);
#endif /* __CROS_DEVICE_STATE_H */