Lines Matching refs:bus

60 	const struct i2c_dt_spec bus;  member
76 ret = tcpci_write_reg16(&cfg->bus, TCPC_REG_ALERT_MASK, mask); in tcpci_init_alert_mask()
121 ret = tcpci_tcpm_get_cc(&cfg->bus, cc1, cc2); in ps8xxx_tcpc_get_cc()
139 return tcpci_update_reg8(&cfg->bus, TCPC_REG_ROLE_CTRL, TCPC_REG_ROLE_CTRL_RP_MASK, in ps8xxx_tcpc_select_rp_value()
149 ret = tcpci_read_reg8(&cfg->bus, TCPC_REG_ROLE_CTRL, &reg_value); in ps8xxx_tcpc_get_rp_value()
166 return tcpci_update_reg8(&cfg->bus, TCPC_REG_ROLE_CTRL, in ps8xxx_tcpc_set_cc()
189 return tcpci_update_reg8(&cfg->bus, TCPC_REG_POWER_CTRL, in ps8xxx_tcpc_vconn_discharge()
205 ret = tcpci_update_reg8(&cfg->bus, TCPC_REG_POWER_CTRL, TCPC_REG_POWER_CTRL_VCONN_EN, in ps8xxx_tcpc_set_vconn()
224 return tcpci_update_reg8(&cfg->bus, TCPC_REG_MSG_HDR_INFO, TCPC_REG_MSG_HDR_INFO_ROLES_MASK, in ps8xxx_tcpc_set_roles()
256 ret = i2c_transfer(cfg->bus.bus, buf, 2, cfg->bus.addr); in ps8xxx_tcpc_get_rx_pending_msg()
288 ret = i2c_transfer(cfg->bus.bus, buf, buf_count, cfg->bus.addr); in ps8xxx_tcpc_get_rx_pending_msg()
296 tcpci_write_reg16(&cfg->bus, TCPC_REG_ALERT, TCPC_REG_ALERT_RX_STATUS); in ps8xxx_tcpc_get_rx_pending_msg()
305 return tcpci_write_reg8(&cfg->bus, TCPC_REG_RX_DETECT, detect_sop_en); in ps8xxx_tcpc_set_rx_enable()
319 &cfg->bus, TCPC_REG_TCPC_CTRL, TCPC_REG_TCPC_CTRL_PLUG_ORIENTATION, in ps8xxx_tcpc_set_cc_polarity()
346 &cfg->bus, TCPC_REG_TRANSMIT, in ps8xxx_tcpc_transmit_data()
372 rv = i2c_transfer(cfg->bus.bus, buf, 3, cfg->bus.addr); in ps8xxx_tcpc_transmit_data()
375 rv = i2c_transfer(cfg->bus.bus, buf, 2, cfg->bus.addr); in ps8xxx_tcpc_transmit_data()
391 rv = tcpci_write_reg8(&cfg->bus, TCPC_REG_TRANSMIT, in ps8xxx_tcpc_transmit_data()
402 LOG_INF("TCPC %s:%s registers:", cfg->bus.bus->name, dev->name); in ps8xxx_tcpc_dump_std_reg()
406 tcpci_read_reg8(&cfg->bus, tcpci_std_regs[a].addr, (uint8_t *)&value); in ps8xxx_tcpc_dump_std_reg()
411 tcpci_read_reg16(&cfg->bus, tcpci_std_regs[a].addr, &value); in ps8xxx_tcpc_dump_std_reg()
468 return tcpci_write_reg8(&cfg->bus, TCPC_REG_COMMAND, cmd); in ps8xxx_tcpc_set_snk_ctrl()
481 return tcpci_write_reg8(&cfg->bus, TCPC_REG_COMMAND, cmd); in ps8xxx_tcpc_set_src_ctrl()
493 ret |= tcpci_read_reg16(&cfg->bus, TCPC_REG_VENDOR_ID, &chip_info->vendor_id); in ps8xxx_tcpc_get_chip_info()
494 ret |= tcpci_read_reg16(&cfg->bus, TCPC_REG_PRODUCT_ID, &chip_info->product_id); in ps8xxx_tcpc_get_chip_info()
495 ret |= tcpci_read_reg16(&cfg->bus, TCPC_REG_BCD_DEV, &chip_info->device_id); in ps8xxx_tcpc_get_chip_info()
501 ret |= tcpci_read_reg8(&cfg->bus, PS8815_REG_FW_VER, &fw_ver); in ps8xxx_tcpc_get_chip_info()
516 return tcpci_write_reg8(&cfg->bus, TCPC_REG_COMMAND, TCPC_REG_COMMAND_I2CIDLE); in ps8xxx_tcpc_set_low_power_mode()
599 tcpci_read_reg16(&cfg->bus, TCPC_REG_ALERT, &alert_reg); in ps8xxx_alert_work_cb()
611 tcpci_read_reg8(&cfg->bus, TCPC_REG_FAULT_STATUS, &fault); in ps8xxx_alert_work_cb()
612 tcpci_write_reg8(&cfg->bus, TCPC_REG_FAULT_STATUS, fault); in ps8xxx_alert_work_cb()
618 tcpci_read_reg8(&cfg->bus, TCPC_REG_EXT_STATUS, &ext_status); in ps8xxx_alert_work_cb()
619 tcpci_write_reg8(&cfg->bus, TCPC_REG_EXT_STATUS, ext_status); in ps8xxx_alert_work_cb()
626 tcpci_read_reg8(&cfg->bus, TCPC_REG_POWER_STATUS, &pwr_status); in ps8xxx_alert_work_cb()
627 tcpci_write_reg8(&cfg->bus, TCPC_REG_POWER_STATUS, pwr_status); in ps8xxx_alert_work_cb()
633 tcpci_read_reg8(&cfg->bus, TCPC_REG_ALERT_EXT, &alert_status); in ps8xxx_alert_work_cb()
634 tcpci_write_reg8(&cfg->bus, TCPC_REG_ALERT_EXT, alert_status); in ps8xxx_alert_work_cb()
651 tcpci_write_reg16(&cfg->bus, TCPC_REG_ALERT, clear_flags); in ps8xxx_alert_work_cb()
653 tcpci_read_reg16(&cfg->bus, TCPC_REG_ALERT, &alert_reg); in ps8xxx_alert_work_cb()
672 res = tcpci_read_reg8(&cfg->bus, TCPC_REG_POWER_STATUS, &power_reg); in ps8xxx_init_work_cb()
688 tcpci_read_reg16(&cfg->bus, TCPC_REG_VENDOR_ID, &idVendor); in ps8xxx_init_work_cb()
689 tcpci_read_reg16(&cfg->bus, TCPC_REG_PRODUCT_ID, &idProduct); in ps8xxx_init_work_cb()
690 tcpci_read_reg16(&cfg->bus, TCPC_REG_BCD_DEV, &idDevice); in ps8xxx_init_work_cb()
716 if (!device_is_ready(cfg->bus.bus)) { in ps8xxx_dev_init()
738 .bus = I2C_DT_SPEC_GET(node), \