[PATCH 2/2] i3c: master: Add driver for Analog Devices I3C Controller IP
Wolfram Sang
wsa+renesas at sang-engineering.com
Thu Jun 5 13:14:19 PDT 2025
> > +static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
> > + const u8 *bytes, int nbytes)
> > +{
> > + writesl(master->regs + REG_SDO_FIFO, bytes, nbytes / 4);
> > + if (nbytes & 3) {
> > + u32 tmp = 0;
> > +
> > + memcpy(&tmp, bytes + (nbytes & ~3), nbytes & 3);
>
> ALIGN_DOWN(bytes, 4)?
>
> Do you need conside big/little endian to trim down data?
The driver uses the same code for reading/writing the FIFO as the
Designware and Cadence driver. The Renesas driver I am working on has
also the same pattern. Time for a helper function maybe
i3c_{read|write}l_to_fifo(register, data, length);
?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-i3c/attachments/20250605/1b5c3d21/attachment-0001.sig>
More information about the linux-i3c
mailing list