/Zephyr-latest/include/zephyr/drivers/usb_c/ |
D | usbc_tcpc.h | 130 int (*get_cc)(const struct device *dev, enum tc_cc_voltage_state *cc1, 179 static inline int tcpc_is_cc_open(enum tc_cc_voltage_state cc1, enum tc_cc_voltage_state cc2) in tcpc_is_cc_open() argument 181 return (cc1 < TC_CC_VOLT_RD) && (cc2 < TC_CC_VOLT_RD); in tcpc_is_cc_open() 187 static inline int tcpc_is_cc_snk_dbg_acc(enum tc_cc_voltage_state cc1, enum tc_cc_voltage_state cc2) in tcpc_is_cc_snk_dbg_acc() argument 189 return cc1 == TC_CC_VOLT_RD && cc2 == TC_CC_VOLT_RD; in tcpc_is_cc_snk_dbg_acc() 195 static inline int tcpc_is_cc_src_dbg_acc(enum tc_cc_voltage_state cc1, enum tc_cc_voltage_state cc2) in tcpc_is_cc_src_dbg_acc() argument 197 return tcpc_is_cc_rp(cc1) && tcpc_is_cc_rp(cc2); in tcpc_is_cc_src_dbg_acc() 203 static inline int tcpc_is_cc_audio_acc(enum tc_cc_voltage_state cc1, enum tc_cc_voltage_state cc2) in tcpc_is_cc_audio_acc() argument 205 return cc1 == TC_CC_VOLT_RA && cc2 == TC_CC_VOLT_RA; in tcpc_is_cc_audio_acc() 211 static inline int tcpc_is_cc_at_least_one_rd(enum tc_cc_voltage_state cc1, in tcpc_is_cc_at_least_one_rd() argument [all …]
|
D | tcpci_priv.h | 116 int tcpci_tcpm_get_cc(const struct i2c_dt_spec *bus, enum tc_cc_voltage_state *cc1,
|
/Zephyr-latest/drivers/usb_c/tcpc/ |
D | tcpci.c | 376 int tcpci_tcpm_get_cc(const struct i2c_dt_spec *bus, enum tc_cc_voltage_state *cc1, in tcpci_tcpm_get_cc() argument 384 if (cc1 == NULL || cc2 == NULL) { in tcpci_tcpm_get_cc() 389 *cc1 = TC_CC_VOLT_OPEN; in tcpci_tcpm_get_cc() 404 *cc1 = TCPC_REG_CC_STATUS_CC1_STATE(status); in tcpci_tcpm_get_cc() 420 if (*cc1 != TC_CC_VOLT_OPEN) { in tcpci_tcpm_get_cc() 436 if (*cc1 != TC_CC_VOLT_OPEN) { in tcpci_tcpm_get_cc() 444 *cc1 |= cc1_present_rd << 2; in tcpci_tcpm_get_cc()
|
D | ps8xxx.c | 52 enum tc_cc_voltage_state cc1; member 101 int ps8xxx_tcpc_get_cc(const struct device *dev, enum tc_cc_voltage_state *cc1, in ps8xxx_tcpc_get_cc() argument 113 *cc1 = data->cc1; in ps8xxx_tcpc_get_cc() 121 ret = tcpci_tcpm_get_cc(&cfg->bus, cc1, cc2); in ps8xxx_tcpc_get_cc() 123 if (IS_ENABLED(CONFIG_USBC_CSM_SINK_ONLY) || *cc1 != data->cc1 || *cc2 != data->cc2) { in ps8xxx_tcpc_get_cc() 124 LOG_DBG("CC changed values: %d->%d, %d->%d", data->cc1, *cc1, data->cc2, *cc2); in ps8xxx_tcpc_get_cc() 125 data->cc1 = *cc1; in ps8xxx_tcpc_get_cc()
|
D | ucpd_numaker.c | 1628 static int numaker_tcpc_get_cc(const struct device *dev, enum tc_cc_voltage_state *cc1, in numaker_tcpc_get_cc() argument 1645 *cc1 = TC_CC_VOLT_RA; in numaker_tcpc_get_cc() 1648 *cc1 = TC_CC_VOLT_RD; in numaker_tcpc_get_cc() 1651 *cc1 = TC_CC_VOLT_OPEN; in numaker_tcpc_get_cc() 1656 *cc1 = TC_CC_VOLT_RP_DEF; in numaker_tcpc_get_cc() 1659 *cc1 = TC_CC_VOLT_RP_1A5; in numaker_tcpc_get_cc() 1662 *cc1 = TC_CC_VOLT_RP_3A0; in numaker_tcpc_get_cc() 1665 *cc1 = TC_CC_VOLT_OPEN; in numaker_tcpc_get_cc() 1668 *cc1 = TC_CC_VOLT_OPEN; in numaker_tcpc_get_cc()
|
D | ucpd_stm32.c | 181 enum tc_cc_voltage_state *cc1, in ucpd_get_cc() argument 242 *cc1 = vstate_cc1; in ucpd_get_cc() 244 *cc1 = TC_CC_VOLT_OPEN; in ucpd_get_cc()
|
/Zephyr-latest/tests/boards/intel_adsp/smoke/src/ |
D | cpus.c | 111 uint32_t cc1, cc0 = ccount(); in core_smoke() local 115 cc1 = ccount(); in core_smoke() 116 } while ((cc1 - cc0) < 1000 || (cyc1 - cyc0) < 1000); in core_smoke() 118 clk_ratios[cpu] = ((cc1 - cc0) * 1000) / (cyc1 - cyc0); in core_smoke()
|
/Zephyr-latest/tests/boards/mtk_adsp/src/ |
D | main.c | 29 uint32_t t1 = k_cycle_get_32(), cc1 = ccount(); in cpu_hz() local 30 uint32_t hz = ((uint64_t)cc1 - cc0) * NOM_HZ / (t1 - t0); in cpu_hz()
|
/Zephyr-latest/subsys/usb/usb_c/ |
D | usbc_tc_snk_states.c | 27 cc = tc->cc_polarity ? tc->cc2 : tc->cc1; in sink_power_sub_states() 106 if (tcpc_is_cc_rp(tc->cc1) || tcpc_is_cc_rp(tc->cc2)) { in tc_unattached_snk_run() 141 if (tcpc_is_cc_rp(tc->cc1) || tcpc_is_cc_rp(tc->cc2)) { in tc_attach_wait_snk_run()
|
D | usbc_tc_src_states.c | 47 if (tcpc_is_cc_at_least_one_rd(tc->cc1, tc->cc2)) { in tc_unattached_src_run() 141 if (tcpc_is_cc_at_least_one_rd(tc->cc1, tc->cc2)) { in tc_attach_wait_src_run() 273 if (tcpc_is_cc_open(tc->cc1, tc->cc2)) { in tc_attached_src_run()
|
D | usbc_tc_common_internal.h | 82 enum tc_cc_voltage_state cc1; member
|
D | usbc_tc_common.c | 82 if (tcpc_get_cc(tcpc, &tc->cc1, &tc->cc2) != 0) { in tc_run() 87 tc->cc1 = TC_CC_VOLT_OPEN; in tc_run() 92 tc->cc_polarity = (tc->cc1 > tc->cc2) ? TC_POLARITY_CC1 : TC_POLARITY_CC2; in tc_run()
|
D | usbc_prl.c | 901 enum tc_cc_voltage_state cc1; in prl_tx_snk_pending_run() local 907 tcpc_get_cc(tcpc, &cc1, &cc2); in prl_tx_snk_pending_run() 922 } else if (cc1 == TC_CC_VOLT_RP_3A0 || cc2 == TC_CC_VOLT_RP_3A0) { in prl_tx_snk_pending_run()
|
/Zephyr-latest/include/zephyr/usb_c/ |
D | tcpci.h | 212 #define TCPC_REG_ROLE_CTRL_SET(drp, rp, cc1, cc2) \ argument 215 (((cc2) << 2) & TCPC_REG_ROLE_CTRL_CC2_MASK) | ((cc1) & TCPC_REG_ROLE_CTRL_CC1_MASK))
|