dm: spi: Add logging of some return values
When SPI flash operations fail it is helpful to be able to see the error codes and where they are generated. Add logging to capture this information for read operations. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -63,11 +63,11 @@ int dm_spi_claim_bus(struct udevice *dev)
|
||||
int ret = spi_set_speed_mode(bus, speed, slave->mode);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
return log_ret(ret);
|
||||
slave->speed = speed;
|
||||
}
|
||||
|
||||
return ops->claim_bus ? ops->claim_bus(dev) : 0;
|
||||
return log_ret(ops->claim_bus ? ops->claim_bus(dev) : 0);
|
||||
}
|
||||
|
||||
void dm_spi_release_bus(struct udevice *dev)
|
||||
@@ -92,7 +92,7 @@ int dm_spi_xfer(struct udevice *dev, unsigned int bitlen,
|
||||
|
||||
int spi_claim_bus(struct spi_slave *slave)
|
||||
{
|
||||
return dm_spi_claim_bus(slave->dev);
|
||||
return log_ret(dm_spi_claim_bus(slave->dev));
|
||||
}
|
||||
|
||||
void spi_release_bus(struct spi_slave *slave)
|
||||
|
||||
Reference in New Issue
Block a user