/* * The I2CR doesn't have CFAM or FSI slave address space - only the * engines. In order for this to work with the FSI core, we need to * emulate at minimum the CFAM config table so that the appropriate * engines are discovered.
*/ if (addr < 0xc00) { if (addr > sizeof(i2cr_cfam) - 4)
addr = (addr & 0x3) + (sizeof(i2cr_cfam) - 4);
memcpy(val, &i2cr_cfam[addr], size); return0;
}
ret = fsi_master_i2cr_read(i2cr, I2CR_ADDRESS_CFAM(addr), &data); if (ret) return ret;
/* * FSI core expects up to 4 bytes BE back, while I2CR replied with LE * bytes on the wire.
*/ for (i = 0; i < size; ++i)
((u8 *)val)[i] = ((u8 *)&data)[7 - i];
/* I2CR writes to CFAM or FSI slave address are a successful no-op. */ if (addr < 0xc00) return0;
/* * FSI core passes up to 4 bytes BE, while the I2CR expects LE bytes on * the wire.
*/ for (i = 0; i < size; ++i)
((u8 *)&data)[7 - i] = ((u8 *)val)[i];
staticint i2cr_probe(struct i2c_client *client)
{ struct fsi_master_i2cr *i2cr; int ret;
i2cr = kzalloc(sizeof(*i2cr), GFP_KERNEL); if (!i2cr) return -ENOMEM;
/* Only one I2CR on any given I2C bus (fixed I2C device address) */
i2cr->master.idx = client->adapter->nr;
dev_set_name(&i2cr->master.dev, "i2cr%d", i2cr->master.idx);
i2cr->master.dev.parent = &client->dev;
i2cr->master.dev.of_node = of_node_get(dev_of_node(&client->dev));
i2cr->master.dev.release = i2cr_release;
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.16Bemerkung:
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.