@@ -262,4 +262,62 @@ int tcpci_tcpm_clear_status_register(const struct i2c_dt_spec *bus, enum tcpc_st
262
262
int tcpci_tcpm_mask_status_register (const struct i2c_dt_spec * bus , enum tcpc_status_reg reg ,
263
263
uint16_t mask );
264
264
265
+ /**
266
+ * @brief Queries the current sinking state of the TCPCI.
267
+ *
268
+ * This function checks if the device is sinking VBUS to the system load.
269
+ *
270
+ * @param bus I2C bus
271
+ * @param sinking Pointer to variable where sinking state will be stored
272
+ * @return int Status of I2C operation, 0 in case of success
273
+ */
274
+ int tcpci_tcpm_get_snk_ctrl (const struct i2c_dt_spec * bus , bool * sinking );
275
+
276
+ /**
277
+ * @brief Queries the current sourcing state of the TCPCI.
278
+ *
279
+ * This function checks if the device is sourcing VBUS.
280
+ *
281
+ * @param bus I2C bus
282
+ * @param sourcing Pointer to variable where sourcing state will be stored
283
+ * @return int Status of I2C operation, 0 in case of success
284
+ */
285
+ int tcpci_tcpm_get_src_ctrl (const struct i2c_dt_spec * bus , bool * sourcing );
286
+
287
+ /**
288
+ * @brief Function to enable or disable sinking power over VBUS.
289
+ *
290
+ * @param bus I2C bus
291
+ * @param enable Boolean flag to enable (true) or disable (false) sinking power
292
+ * @return int Status of I2C operation, 0 in case of success
293
+ */
294
+ int tcpci_tcpm_set_snk_ctrl (const struct i2c_dt_spec * bus , bool enable );
295
+
296
+ /**
297
+ * @brief Function to enable or disable sourcing power over VBUS.
298
+ *
299
+ * @param bus I2C bus
300
+ * @param enable Boolean flag to enable (true) or disable (false) sourcing power
301
+ * @return int Status of I2C operation, 0 in case of success
302
+ */
303
+ int tcpci_tcpm_set_src_ctrl (const struct i2c_dt_spec * bus , bool enable );
304
+
305
+ /**
306
+ * @brief Function to enable or disable the debug accessory mode.
307
+ *
308
+ * @param bus I2C bus
309
+ * @param enable Boolean flag to enable (true) or disable (false) debug accessory mode
310
+ * @return int Status of I2C operation, 0 in case of success
311
+ */
312
+ int tcpci_tcpm_set_debug_accessory (const struct i2c_dt_spec * bus , bool enable );
313
+
314
+ /**
315
+ * @brief Function to enable or disable the low power mode.
316
+ *
317
+ * @param bus I2C bus
318
+ * @param enable Boolean flag to enable (true) or disable (false) low power mode
319
+ * @return int Status of I2C operation, 0 in case of success
320
+ */
321
+ int tcpci_tcpm_set_low_power_mode (const struct i2c_dt_spec * bus , bool enable );
322
+
265
323
#endif /* ZEPHYR_INCLUDE_DRIVERS_USBC_TCPCI_PRIV_H_ */
0 commit comments