Lines Matching +full:vbus +full:- +full:discharge
4 * SPDX-License-Identifier: Apache-2.0
24 /* Implementation notes on NuMaker TCPC/PPC/VBUS
26 * PPC and VBUS rely on TCPC/UTCPD and are just pseudo. They are completely
38 * @brief Initializes the usb-c vbus driver
41 * @retval -ENODEV if dependent TCPC device is not ready
45 const struct numaker_vbus_config *const config = dev->config; in numaker_vbus_init()
46 const struct device *tcpc_dev = config->tcpc_dev; in numaker_vbus_init()
51 return -ENODEV; in numaker_vbus_init()
58 * @brief Checks if VBUS is at a particular level
60 * @retval true if VBUS is at the level voltage
61 * @retval false if VBUS is not at that level voltage
65 const struct numaker_vbus_config *const config = dev->config; in numaker_vbus_check_level()
66 const struct device *tcpc_dev = config->tcpc_dev; in numaker_vbus_check_level()
72 * @brief Reads and returns VBUS measured in mV
75 * @retval -EIO on failure
79 const struct numaker_vbus_config *const config = dev->config; in numaker_vbus_measure()
80 const struct device *tcpc_dev = config->tcpc_dev; in numaker_vbus_measure()
86 * @brief Controls a pin that discharges VBUS
89 * @retval -EIO on failure
93 const struct numaker_vbus_config *const config = dev->config; in numaker_vbus_discharge()
94 const struct device *tcpc_dev = config->tcpc_dev; in numaker_vbus_discharge()
100 * @brief Controls a pin that enables VBUS measurments
103 * @retval -EIO on failure
107 const struct numaker_vbus_config *const config = dev->config; in numaker_vbus_enable()
108 const struct device *tcpc_dev = config->tcpc_dev; in numaker_vbus_enable()
116 .discharge = numaker_vbus_discharge,