[v4,18/19] spi: bcm63xx: extend error condition to `delay` as well
diff mbox series

Message ID 20190926105147.7839-19-alexandru.ardelean@analog.com
State Accepted
Commit c5751ba0f71e3afe62000a9505915093efa31bd6
Headers show
  • spi: introduce `struct spi_delay` data-type
Related show

Commit Message

Ardelean, Alexandru Sept. 26, 2019, 10:51 a.m. UTC
The driver errors out if `delay_usecs` is non-zero. This error condition
should be extended to the new `delay` field, to account for when it will be

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
 drivers/spi/spi-bcm63xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
index df1c94a131e6..4e582acda709 100644
--- a/drivers/spi/spi-bcm63xx.c
+++ b/drivers/spi/spi-bcm63xx.c
@@ -368,7 +368,7 @@  static int bcm63xx_spi_transfer_one(struct spi_master *master,
 		/* CS will be deasserted directly after transfer */
-		if (t->delay_usecs) {
+		if (t->delay_usecs || t->delay.value) {
 			dev_err(&spi->dev, "unable to keep CS asserted after transfer\n");
 			status = -EINVAL;
 			goto exit;