
21 Apr
2023
21 Apr
'23
7:13 a.m.
On 20/04/23 22:02, Svyatoslav Ryhel wrote:
..]
+static int ssd2825_spi_write(struct udevice *dev, int reg,
const void *buf, int flags)
+{
struct spi_slave *slave = dev_get_parent_priv(dev);
u8 command[2];
if (flags & SSD2825_CMD_SEND) {
command[0] = SSD2825_CMD_MASK;
command[1] = reg;
spi_xfer(slave, 9, &command,
NULL, SPI_XFER_ONCE);
Please can you use dm_spi_xfer() instead, thoughout?
I will replace it, but isn't spi_xfer preferable over dm_spi_xfer? I remember that I had doubts about which to use.
No, we should use the dm variants where available, since then we can drop the old ones.
I have switched to the dm version and it seems to fit even better, everything works perfectly fine.
Yes, please switch to dm_spi_xfer() for DM compatible clients.
--
Regards
Vignesh