Lines Matching refs:offset_len
48 int offset_len; in i2c_setup_offset() local
52 msg->len = chip->offset_len; in i2c_setup_offset()
54 if (!chip->offset_len) in i2c_setup_offset()
56 assert(chip->offset_len <= I2C_MAX_OFFSET_LEN); in i2c_setup_offset()
57 offset_len = chip->offset_len; in i2c_setup_offset()
58 while (offset_len--) in i2c_setup_offset()
59 *offset_buf++ = offset >> (8 * offset_len); in i2c_setup_offset()
183 memcpy(buf + chip->offset_len, buffer, len); in dm_i2c_write()
195 memcpy(buf + chip->offset_len, buffer, len); in dm_i2c_write()
282 static int i2c_bind_driver(struct udevice *bus, uint chip_addr, uint offset_len, in i2c_bind_driver() argument
302 chip->offset_len = offset_len; in i2c_bind_driver()
322 int i2c_get_chip(struct udevice *bus, uint chip_addr, uint offset_len, in i2c_get_chip() argument
344 return i2c_bind_driver(bus, chip_addr, offset_len, devp); in i2c_get_chip()
347 int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len, in i2c_get_chip_for_busnum() argument
358 ret = i2c_get_chip(bus, chip_addr, offset_len, devp); in i2c_get_chip_for_busnum()
447 int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len) in i2c_set_chip_offset_len() argument
451 if (offset_len > I2C_MAX_OFFSET_LEN) in i2c_set_chip_offset_len()
453 chip->offset_len = offset_len; in i2c_set_chip_offset_len()
462 return chip->offset_len; in i2c_get_chip_offset_len()
488 chip->offset_len = dev_read_u32_default(dev, "u-boot,i2c-offset-len", in i2c_chip_ofdata_to_platdata()