/* This should be called for each AT24 device that needs to be emulated. It registers it with the I2C emulation controller. */
static int emul_atmel_at24_init(const struct emul *target, const struct device *parent)
/* This should be called for each AT24 device that needs to be emulated. It registers it with the I2C emulation controller. */
static int emul_atmel_at24_init(const struct emul *target, const struct device *parent)
{
	const struct at24_emul_cfg *cfg = target->cfg;
	struct at24_emul_data *data = target->data;
	data->emul.api = &bus_api;
	data->emul.addr = cfg->addr;
	data->emul.target = target;
	data->i2c = parent;
	data->cur_reg = 0;
	memset(cfg->buf, 0xff, cfg->size);
	return 0;
}