Lines Matching +full:i2c +full:- +full:errors
3 * SPDX-License-Identifier: Apache-2.0
212 int tcpci_read_reg8(const struct i2c_dt_spec *i2c, uint8_t reg, uint8_t *value) in tcpci_read_reg8() argument
217 ret = i2c_write_read(i2c->bus, i2c->addr, ®, sizeof(reg), value, sizeof(*value)); in tcpci_read_reg8()
225 LOG_ERR(LOG_COMM_ERR_STR, i2c->bus->name, i2c->addr, "r8", reg, *value); in tcpci_read_reg8()
231 int tcpci_write_reg8(const struct i2c_dt_spec *i2c, uint8_t reg, uint8_t value) in tcpci_write_reg8() argument
237 ret = i2c_write(i2c->bus, buf, 2, i2c->addr); in tcpci_write_reg8()
245 LOG_ERR(LOG_COMM_ERR_STR, i2c->bus->name, i2c->addr, "w8", reg, value); in tcpci_write_reg8()
251 int tcpci_update_reg8(const struct i2c_dt_spec *i2c, uint8_t reg, uint8_t mask, uint8_t value) in tcpci_update_reg8() argument
256 ret = tcpci_read_reg8(i2c, reg, &old_value); in tcpci_update_reg8()
264 ret = tcpci_write_reg8(i2c, reg, old_value); in tcpci_update_reg8()
269 int tcpci_read_reg16(const struct i2c_dt_spec *i2c, uint8_t reg, uint16_t *value) in tcpci_read_reg16() argument
274 ret = i2c_write_read(i2c->bus, i2c->addr, ®, sizeof(reg), value, sizeof(*value)); in tcpci_read_reg16()
283 LOG_ERR(LOG_COMM_ERR_STR, i2c->bus->name, i2c->addr, "r16", reg, *value); in tcpci_read_reg16()
289 int tcpci_write_reg16(const struct i2c_dt_spec *i2c, uint8_t reg, uint16_t value) in tcpci_write_reg16() argument
297 ret = i2c_write(i2c->bus, buf, 3, i2c->addr); in tcpci_write_reg16()
304 LOG_ERR(LOG_COMM_ERR_STR, i2c->bus->name, i2c->addr, "w16", reg, value); in tcpci_write_reg16()
341 /** A high-voltage alarm has occurred */ in tcpci_alert_reg_to_enum()
344 /** A low-voltage alarm has occurred */ in tcpci_alert_reg_to_enum()
373 return -1; in tcpci_alert_reg_to_enum()
385 return -EINVAL; in tcpci_tcpm_get_cc()
388 /* errors will return CC as open */ in tcpci_tcpm_get_cc()