D | tcpci.c | 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() [all …]
|