Lines Matching refs:offset_len
60 int offset_len = chip->offset_len; in i2c_setup_offset() local
64 msg->addr |= (offset >> (8 * offset_len)) & in i2c_setup_offset()
67 msg->len = chip->offset_len; in i2c_setup_offset()
69 if (!offset_len) in i2c_setup_offset()
71 assert(offset_len <= I2C_MAX_OFFSET_LEN); in i2c_setup_offset()
73 while (offset_len--) in i2c_setup_offset()
74 *offset_buf++ = offset >> (8 * offset_len); in i2c_setup_offset()
198 memcpy(buf + chip->offset_len, buffer, len); in dm_i2c_write()
210 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
345 return i2c_bind_driver(bus, chip_addr, offset_len, devp); in i2c_get_chip()
348 int i2c_get_chip_for_busnum(int busnum, int chip_addr, uint offset_len, in i2c_get_chip_for_busnum() argument
370 ret = i2c_get_chip(bus, chip_addr, offset_len, devp); in i2c_get_chip_for_busnum()
459 int i2c_set_chip_offset_len(struct udevice *dev, uint offset_len) in i2c_set_chip_offset_len() argument
463 if (offset_len > I2C_MAX_OFFSET_LEN) in i2c_set_chip_offset_len()
465 chip->offset_len = offset_len; in i2c_set_chip_offset_len()
474 return chip->offset_len; in i2c_get_chip_offset_len()
624 chip->offset_len = dev_read_u32_default(dev, "u-boot,i2c-offset-len", in i2c_chip_of_to_plat()