summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2020-01-08 07:59:42 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-09 19:24:11 +0000
commit4ae38ae35d55559feb1524bdbc1482ca7c858f2b (patch)
treeeebeb418c36bf28914cc02452f74dd494842cea9 /include
parentd3a1820df21b12842232ab88a5c1a0490640bb25 (diff)
downloadchrome-ec-4ae38ae35d55559feb1524bdbc1482ca7c858f2b.tar.gz
pd: cleanup pd_get_data_role
This is the second half of b/147290482 Cleaning up to use pd_data_role instead of int BUG=b:147314832 BRANCH=none TEST=make buildall -j Change-Id: I2445b06f5f5469fb1f3a968034a83e3ee792e7c7 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1991845 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/usb_pd.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/usb_pd.h b/include/usb_pd.h
index 87e24e2ba5..9537ae1a8c 100644
--- a/include/usb_pd.h
+++ b/include/usb_pd.h
@@ -1765,7 +1765,8 @@ __override_proto int pd_check_power_swap(int port);
* @param data_role current data role
* @return True if data swap is allowed, False otherwise
*/
-__override_proto int pd_check_data_swap(int port, int data_role);
+__override_proto int pd_check_data_swap(int port,
+ enum pd_data_role data_role);
/**
* Check if vconn swap is allowed.
@@ -1794,7 +1795,9 @@ __override_proto void pd_check_pr_role(int port,
* @param dr_role Our data role
* @param flags PD flags
*/
-__override_proto void pd_check_dr_role(int port, int dr_role, int flags);
+__override_proto void pd_check_dr_role(int port,
+ enum pd_data_role dr_role,
+ int flags);
/**
* Check if we should charge from this device. This is
@@ -1813,7 +1816,8 @@ int pd_charge_from_device(uint16_t vid, uint16_t pid);
* @param port USB-C port number
* @param data_role new data role
*/
-__override_proto void pd_execute_data_swap(int port, int data_role);
+__override_proto void pd_execute_data_swap(int port,
+ enum pd_data_role data_role);
/**
* Get PD device info used for VDO_CMD_SEND_INFO / VDO_CMD_READ_INFO
@@ -1917,7 +1921,9 @@ uint16_t pd_get_identity_pid(int port);
* For rev2.0, true if vconn is on and data_role is dfp
* False otherwise
*/
-uint8_t is_sop_prime_ready(int port, uint8_t data_role, uint32_t pd_flags);
+uint8_t is_sop_prime_ready(int port,
+ enum pd_data_role data_role,
+ uint32_t pd_flags);
/**
* Reset Cable type, Cable attributes and cable flags