summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2020-01-08 06:54:30 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-09 19:24:10 +0000
commitd3a1820df21b12842232ab88a5c1a0490640bb25 (patch)
treeb0855ad62d8c5f42178cec6cf9038563c9253fb1 /driver
parenta6591e9d5c7caa04f94e604d8a649d9f8e6d5b5b (diff)
downloadchrome-ec-d3a1820df21b12842232ab88a5c1a0490640bb25.tar.gz
pd: cleanup pd_get_role
pd_get_role in the TCPMv1 stack meant pd_get_power_role. pd_get_role in the TCPMv2 stack meant pd_get_data_role. This CL will clean that up and make them the correct naming. pd_get_power_role will also return an enum pd_power_role type instead of an int. BUG=b:147290482 BRANCH=none TEST=make buildall -j Change-Id: I73ee465401ccd050c2bd151f2fc043a59d95e079 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1991844 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/tcpm/fusb302.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/driver/tcpm/fusb302.c b/driver/tcpm/fusb302.c
index 3514b2e865..dc31228506 100644
--- a/driver/tcpm/fusb302.c
+++ b/driver/tcpm/fusb302.c
@@ -1078,7 +1078,7 @@ static int fusb302_tcpm_enter_low_power_mode(int port)
mode = TCPC_REG_CONTROL2_MODE_UFP;
break;
case PD_DRP_FREEZE:
- mode = pd_get_role(port) == PD_ROLE_SINK ?
+ mode = pd_get_power_role(port) == PD_ROLE_SINK ?
TCPC_REG_CONTROL2_MODE_UFP :
TCPC_REG_CONTROL2_MODE_DFP;
break;