Lines Matching refs:bus

50 	const struct i2c_dt_spec bus;  member
71 int ina226_reg_read_16(const struct i2c_dt_spec *bus, uint8_t reg, uint16_t *val) in ina226_reg_read_16() argument
76 ret = i2c_burst_read_dt(bus, reg, data, sizeof(data)); in ina226_reg_read_16()
86 int ina226_reg_write(const struct i2c_dt_spec *bus, uint8_t reg, uint16_t val) in ina226_reg_write() argument
93 return i2c_write_dt(bus, tx_buf, sizeof(tx_buf)); in ina226_reg_write()
140 ret = ina226_reg_read_16(&config->bus, INA226_REG_BUS_VOLT, &data->bus_voltage); in ina226_read_data()
148 ret = ina226_reg_read_16(&config->bus, INA226_REG_CURRENT, &data->current); in ina226_read_data()
156 ret = ina226_reg_read_16(&config->bus, INA226_REG_POWER, &data->power); in ina226_read_data()
165 ret = ina226_reg_read_16(&config->bus, INA226_REG_SHUNT_VOLT, &data->shunt_voltage); in ina226_read_data()
202 return ina226_reg_write(&config->bus, INA226_REG_CONFIG, data); in ina226_attr_set()
204 return ina226_reg_write(&config->bus, INA226_REG_CALIB, data); in ina226_attr_set()
220 ret = ina226_reg_read_16(&config->bus, INA226_REG_CONFIG, &data); in ina226_attr_get()
226 ret = ina226_reg_read_16(&config->bus, INA226_REG_CALIB, &data); in ina226_attr_get()
247 ret = ina226_reg_write(&config->bus, INA226_REG_CALIB, config->cal); in ina226_calibrate()
262 if (!i2c_is_ready_dt(&config->bus)) { in ina226_init()
263 LOG_ERR("I2C bus %s is not ready", config->bus.bus->name); in ina226_init()
269 ret = ina226_reg_read_16(&config->bus, INA226_REG_MANUFACTURER_ID, &id); in ina226_init()
280 ret = ina226_reg_read_16(&config->bus, INA226_REG_DEVICE_ID, &id); in ina226_init()
291 ret = ina226_reg_write(&config->bus, INA226_REG_CONFIG, config->config); in ina226_init()
316 .bus = I2C_DT_SPEC_INST_GET(inst), \