diff options
author | Simon Glass | 2018-10-01 12:22:24 -0600 |
---|---|---|
committer | Simon Glass | 2018-10-09 04:40:27 -0600 |
commit | 5e24a2ef8bf4f09b18cf4e943c73bfdd169a7581 (patch) | |
tree | 1904eaa99bc48ca33ac63d8eb3b325d21c34902b /drivers/spi/spi-uclass.c | |
parent | 42116f644b33d4c9e7b495ec87612aa922452453 (diff) |
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>
Diffstat (limited to 'drivers/spi/spi-uclass.c')
-rw-r--r-- | drivers/spi/spi-uclass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index c517d066f69..b84255bd274 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -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) |