diff options
author | Benson Leung <bleung@chromium.org> | 2019-12-12 10:18:45 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-12 21:09:21 +0000 |
commit | 8c3f625e104a9ae8fd44f42974f256690cf28f7f (patch) | |
tree | 41a823c3296a055725d9800369a7a29e5c048564 /util | |
parent | 18cb44fec23ed2c90d9f3b6e147ffbc326ffedca (diff) | |
download | chrome-ec-8c3f625e104a9ae8fd44f42974f256690cf28f7f.tar.gz |
usb_pd: Rename "Externally powered" to "Unconstrained Power"
This was changed in PD 2.0 years ago (via ECN authored by our own David
Schneider), but our codebase still refers to BIT 27 of the Fixed PDO as
"Externally powered" instead of "Unconstrained Power".
This will search and replace all instances of "Externally powered" when it
refers to BIT 27, as well as function names, other internal representations
of that property, strings, and comments.
seds:
s/PD_FLAGS_PARTNER_EXTPOWER/PD_FLAGS_PARTNER_UNCONSTR/g
s/partner_extpower/partner_unconstrained/g
s/externally powered/unconstrained/g
Some others too.
Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium:1030990
TEST=Codebase builds clean. No functional change, except for the property shows
up in ectool as "Unconstrained power" now.
Change-Id: I5ececa03f29eb31057be3d0ad5311117093bc6da
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1956147
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Benson Leung <bleung@google.com>
Tested-by: Benson Leung <bleung@google.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/ectool.c | 4 | ||||
-rw-r--r-- | util/genvif.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/util/ectool.c b/util/ectool.c index 802ea530ba..32312fe52b 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -5592,8 +5592,8 @@ int cmd_usb_pd(int argc, char *argv[]) " DR data\n" : "", (r_v1->role & PD_CTRL_RESP_ROLE_USB_COMM) ? " USB capable\n" : "", - (r_v1->role & PD_CTRL_RESP_ROLE_EXT_POWERED) ? - " Externally powered\n" : ""); + (r_v1->role & PD_CTRL_RESP_ROLE_UNCONSTRAINED) ? + " Unconstrained power\n" : ""); } return 0; } diff --git a/util/genvif.c b/util/genvif.c index ba217a4acf..796384aee0 100644 --- a/util/genvif.c +++ b/util/genvif.c @@ -115,10 +115,10 @@ static int is_snk(void) #endif } -static int is_extpwr(void) +static int is_unconstrained(void) { if (is_src()) - return !!(src_pdo[0] & PDO_FIXED_EXTERNAL); + return !!(src_pdo[0] & PDO_FIXED_UNCONSTRAINED); else return 0; } @@ -449,7 +449,8 @@ static int gen_vif(const char *name, const char *board, dr_swap_to_dfp_supported()); fprintf(vif, "DR_Swap_To_UFP_Supported: %s\r\n", dr_swap_to_ufp_supported()); - fprintf(vif, "Unconstrained_Powered: %s\r\n", yes_no(is_extpwr())); + fprintf(vif, "Unconstrained_Powered: %s\r\n", + yes_no(is_unconstrained())); fprintf(vif, "VCONN_Swap_To_On_Supported: %s\r\n", vconn_swap()); fprintf(vif, "VCONN_Swap_To_Off_Supported: %s\r\n", vconn_swap()); fprintf(vif, "Responds_To_Discov_SOP: YES\r\n"); |