summaryrefslogtreecommitdiff
path: root/include/usb_pd_tcpm.h
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2018-10-12 09:48:25 -0600
committerchrome-bot <chrome-bot@chromium.org>2018-10-12 15:16:49 -0700
commit91fd6c54d03f919d97ca4151191eb7a9a11f85dc (patch)
tree11463be0b82dab09558e0897366807130d5992ec /include/usb_pd_tcpm.h
parent2dc1ac3ffcbef2da74f717472b8404ba5bc65e1e (diff)
downloadchrome-ec-91fd6c54d03f919d97ca4151191eb7a9a11f85dc.tar.gz
cleanup: rename Rp enum values for clarity
The tcpc_cc_voltage_status enum contains different values for different detected resister values of the port partner. Both Ra and Rd values contained that in the name, but Rp values did not. Update _SNK_ tag to _RP_ tag to make it more clear what resistor is being applied by port partner. Also adding a few more comments in usb_pd_tcpm.h for clarify on the different uses of CC resistor enums. BRANCH=none BUG=none TEST=builds. just a rename change. Change-Id: Id5f7bb502f735bef5937585e2e8bd516ad428a99 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278103 Reviewed-by: Scott Collyer <scollyer@chromium.org>
Diffstat (limited to 'include/usb_pd_tcpm.h')
-rw-r--r--include/usb_pd_tcpm.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/usb_pd_tcpm.h b/include/usb_pd_tcpm.h
index 290261c081..d46aef454d 100644
--- a/include/usb_pd_tcpm.h
+++ b/include/usb_pd_tcpm.h
@@ -16,15 +16,17 @@
/* Time to wait for TCPC to complete transmit */
#define PD_T_TCPC_TX_TIMEOUT (100*MSEC)
+/* Detected resistor values of port partner */
enum tcpc_cc_voltage_status {
TYPEC_CC_VOLT_OPEN = 0,
- TYPEC_CC_VOLT_RA = 1, /* Port partner is applying Ra */
- TYPEC_CC_VOLT_RD = 2, /* Port partner is applying Rd */
- TYPEC_CC_VOLT_SNK_DEF = 5, /* Port partner is applying Rp (0.5A) */
- TYPEC_CC_VOLT_SNK_1_5 = 6, /* Port partner is applying Rp (1.5A) */
- TYPEC_CC_VOLT_SNK_3_0 = 7, /* Port partner is applying Rp (3.0A) */
+ TYPEC_CC_VOLT_RA = 1, /* Port partner is applying Ra */
+ TYPEC_CC_VOLT_RD = 2, /* Port partner is applying Rd */
+ TYPEC_CC_VOLT_RP_DEF = 5, /* Port partner is applying Rp (0.5A) */
+ TYPEC_CC_VOLT_RP_1_5 = 6, /* Port partner is applying Rp (1.5A) */
+ TYPEC_CC_VOLT_RP_3_0 = 7, /* Port partner is applying Rp (3.0A) */
};
+/* Resistor types we apply on our side of the CC lines */
enum tcpc_cc_pull {
TYPEC_CC_RA = 0,
TYPEC_CC_RP = 1,
@@ -32,6 +34,7 @@ enum tcpc_cc_pull {
TYPEC_CC_OPEN = 3,
};
+/* Pull-up values we apply as a SRC to advertise different current limits */
enum tcpc_rp_value {
TYPEC_RP_USB = 0,
TYPEC_RP_1A5 = 1,