Lines Matching +full:power +full:- +full:role

4  * SPDX-License-Identifier: Apache-2.0
20 /* A Source power role evauates to 1. See usbc_tc.h: TC_ROLE_SOURCE */
44 /** True if power supply is ready */
46 /** True if power supply should transition to a new level */
91 *rp = dpm_data->rp; in port0_policy_cb_get_src_rp()
98 * Power Supply
114 dpm_data->vconn_pol = pol; in port0_policy_cb_vconn_en()
139 *pdos = dpm_data->src_caps; in port0_policy_cb_get_src_caps()
140 *num_pdos = dpm_data->src_cap_cnt; in port0_policy_cb_get_src_caps()
156 dpm_data->sink_request.raw_value = request_msg; in port0_policy_cb_check_sink_request()
157 obj_pos = dpm_data->sink_request.fixed.object_pos; in port0_policy_cb_check_sink_request()
159 PD_CONVERT_FIXED_PDO_CURRENT_TO_MA(dpm_data->sink_request.fixed.operating_current); in port0_policy_cb_check_sink_request()
161 if (obj_pos == 0 || obj_pos > dpm_data->src_cap_cnt) { in port0_policy_cb_check_sink_request()
165 pdo.raw_value = dpm_data->src_caps[obj_pos - 1]; in port0_policy_cb_check_sink_request()
167 if (dpm_data->sink_request.fixed.operating_current > pdo.max_current) { in port0_policy_cb_check_sink_request()
171 dpm_data->obj_pos = obj_pos; in port0_policy_cb_check_sink_request()
185 * @brief PE calls this function to check if the Power Supply is at the requested
193 /* Return true to inform that the Power Supply is ready */ in port0_policy_cb_is_ps_ready()
194 return dpm_data->ps_ready; in port0_policy_cb_is_ps_ready()
214 if (obj_pos == 0 || obj_pos > dpm_data->src_cap_cnt) { in port0_policy_cb_present_contract_is_valid()
218 pdo.raw_value = dpm_data->src_caps[obj_pos - 1]; in port0_policy_cb_present_contract_is_valid()
247 dpm_data->ps_tran_start = true; in port0_notify()
268 /* Power off VCONN */ in port0_notify()
286 /* Reject power role swaps */ in port0_policy_check()
289 /* Accept data role swap to DFP */ in port0_policy_check()
292 /* Reject data role swap to UFP */ in port0_policy_check()
299 * 2: Return TRUE when Power Supply is at default level in port0_policy_check()
302 /* Power on VCONN */ in port0_policy_check()
303 vconn_ctrl_set(dpm_data->vconn_pol); in port0_policy_check()
327 /* Register USB-C Callbacks */ in main()
335 /* Register Policy callback to enable or disable power supply */ in main()
343 /* Register Policy callback to check if the power supply is ready */ in main()
359 /* Init power supply transition start */ in main()
361 /* Init power supply ready */ in main()
365 /* Start the USB-C Subsystem */ in main()
375 * Transition Power Supply to new voltage. in main()