Lines Matching +full:source +full:- +full:pdos
4 * SPDX-License-Identifier: Apache-2.0
17 #define PRIV_PORT_REQUEST_SUSPEND -1
18 #define PRIV_PORT_REQUEST_START -2
65 /* Type-C layer data */
67 /** Type-C state machine object */
69 /** Enables or Disables the Type-C state machine */
71 /** The state of the Type-C state machine */
100 /** The Type-C Port Controller on this port */
112 /** Bypass next sleep and request one more iteration of the USB-C state machines */
115 /* USB-C Callbacks */
141 int (*policy_cb_get_snk_cap)(const struct device *dev, uint32_t **pdos, int *num_pdos);
144 * Callback used by the Policy Engine to send the received Source
147 void (*policy_cb_set_src_cap)(const struct device *dev, const uint32_t *pdos,
162 * Callback used by the Policy Engine get the Rp pull-up that should
170 * Source Power Supply
175 * Callback used by the Policy Engine to get the Source Caps that
179 const uint32_t **pdos,
197 * Callback used by the Policy Engine to check if the Source Power Supply
204 * Source Caps be used
212 const uint32_t *pdos,
221 * @brief Function that enables the source path either using callback or by the TCPC.
222 * If source and sink paths are controlled by the TCPC, this callback doesn't have to be set.
224 * @param dev USB-C connector device
225 * @param tcpc Type-C Port Controller device
227 * @return int 0 if success, -ENOSYS if both callback and TCPC function are not implemented.
232 struct usbc_port_data *data = dev->data; in usbc_policy_src_en()
233 int ret_cb = -ENOSYS; in usbc_policy_src_en()
236 if (data->policy_cb_src_en != NULL) { in usbc_policy_src_en()
237 ret_cb = data->policy_cb_src_en(dev, en); in usbc_policy_src_en()
238 if (ret_cb != 0 && ret_cb != -ENOSYS) { in usbc_policy_src_en()
244 if (ret_tcpc == -ENOSYS) { in usbc_policy_src_en()