summaryrefslogtreecommitdiff
path: root/include/usb_charge.h
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2014-01-22 15:36:08 -0800
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-01-23 19:32:27 +0000
commit75857e80d0ef0426fd80fd7cb526ff7b895ba9a0 (patch)
tree8a4695ef235c925bcb0b30306f293588a5ec9a00 /include/usb_charge.h
parentc8c66cdb77eef484d481cc2793f5f73e43542e55 (diff)
downloadchrome-ec-75857e80d0ef0426fd80fd7cb526ff7b895ba9a0.tar.gz
rambi: Leave 5V rail on in S3 if USB ports are powered
Previously, the 5V rail was disabled unconditionally in the S0->S3 transition. Now, the rail is left powered if one or both of the USB ports are powered. BUG=chrome-os-partner:25178 BRANCH=rambi TEST=Modify the OS to leave USB ports powered in S3. Then suspend. On the EC console, 'gpioget pp5000_en' should be 1. Change-Id: I3c73f3fe228e940317c0da7330f117c7ab0a6d0c Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/183548 Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include/usb_charge.h')
-rw-r--r--include/usb_charge.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/usb_charge.h b/include/usb_charge.h
index 66e6611985..e67aba482e 100644
--- a/include/usb_charge.h
+++ b/include/usb_charge.h
@@ -34,4 +34,12 @@ enum usb_charge_mode {
*/
int usb_charge_set_mode(int usb_port_id, enum usb_charge_mode mode);
+/**
+ * Return a bitmask of which USB ports are enabled.
+ *
+ * If bit (1 << i) is set, port <i> is enabled. If it is clear, port <i> is
+ * in USB_CHARGE_MODE_DISABLED.
+ */
+int usb_charge_ports_enabled(void);
+
#endif /* __CROS_EC_USB_CHARGE_H */