summaryrefslogtreecommitdiff
path: root/driver/pi3usb9281.h
diff options
context:
space:
mode:
authorAlec Berg <alecaberg@chromium.org>2014-10-15 13:09:38 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-10-30 04:31:34 +0000
commit498abf833cad27c5014cdb2d1511f3860703ba82 (patch)
treebee810af95220991f45cca57b52eebbee9da3ef4 /driver/pi3usb9281.h
parentcfbb9e51b2abfd562af865c0b11362d48d799cfd (diff)
downloadchrome-ec-498abf833cad27c5014cdb2d1511f3860703ba82.tar.gz
samus_pd: add host command to get type-c port power info
Get type-c port power info including power role, charger type, and charging info. Also added host command to get number of type-c ports. Also adds new charging suppliers for pericom identified chargers including DCP, CDP, SDP, proprietary, and other chargers. Priority of these for charging is set in samus board file. BUG=chrome-os-partner:32650 BRANCH=samus TEST=run 'ectool --name=cros_pd usbpdpower' and verify correct status with minimuffin, zinger, and type-C to type-A adapter. Change-Id: I1dabbe7de4185a23df5684a5ea9a2d944f1f6ff5 Signed-off-by: Alec Berg <alecaberg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/223523 Tested-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org> Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'driver/pi3usb9281.h')
-rw-r--r--driver/pi3usb9281.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/driver/pi3usb9281.h b/driver/pi3usb9281.h
index d26295b846..392c02ae52 100644
--- a/driver/pi3usb9281.h
+++ b/driver/pi3usb9281.h
@@ -46,6 +46,8 @@
#define PI3USB9281_CHG_APPLE_1A (1 << 2)
#define PI3USB9281_CHG_APPLE_2A (1 << 3)
#define PI3USB9281_CHG_APPLE_2_4A (1 << 4)
+/* Check if charge status has any connection */
+#define PI3USB9281_CHG_STATUS_ANY(x) (((x) & 0x1f) > 1)
/* Read PI3USB9281 register. */
uint8_t pi3usb9281_read(uint8_t chip_idx, uint8_t reg);