diff options
author | Neil DI FOLCO <neil.difolco@qorvo.com> | 2023-02-10 15:29:10 +0100 |
---|---|---|
committer | Neil DI FOLCO <neil.difolco@qorvo.com> | 2023-02-10 18:04:51 +0100 |
commit | 1c5cd5b984fa3e2ff42faf75823d7544b9ac88a3 (patch) | |
tree | 8fa680e3c54be6843de242caa7f845245bd0f846 | |
parent | 59662009ebec4d82043603ded082bcf13036cbe1 (diff) | |
download | uwb-1c5cd5b984fa3e2ff42faf75823d7544b9ac88a3.tar.gz |
qm35: do not release wakeup during SPI transfer
Bug: 268591347
Change-Id: I2b0575cec98995de2ed7a1470096206bb2697b97
Signed-off-by: Neil DI FOLCO <neil.difolco@qorvo.com>
-rw-r--r-- | hsspi.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -219,11 +219,10 @@ static int spi_xfer(struct hsspi *hsspi, const void *tx, void *rx, hsspi->soc->ul = 0; hsspi->soc->length = 0; + hsspi->wakeup_enter(hsspi); do { - hsspi->wakeup_enter(hsspi); ret = hsspi_wait_ss_ready(hsspi); if (ret < 0) { - hsspi->wakeup_release(hsspi); continue; } @@ -238,7 +237,6 @@ static int spi_xfer(struct hsspi *hsspi, const void *tx, void *rx, HSSPI_MANUAL_CS_SETUP_US); #endif ret = spi_sync_transfer(hsspi->spi, xfers, length ? 2 : 1); - hsspi->wakeup_release(hsspi); trace_hsspi_spi_xfer(&hsspi->spi->dev, hsspi->host, hsspi->soc, ret); @@ -251,9 +249,6 @@ static int spi_xfer(struct hsspi *hsspi, const void *tx, void *rx, if (!(hsspi->soc->flags & STC_SOC_RDY) || (hsspi->soc->flags == 0xff)) { - dev_err(&hsspi->spi->dev, - "FW not ready (flags %#02x)\n", - hsspi->soc->flags); ret = -EAGAIN; continue; } @@ -262,6 +257,13 @@ static int spi_xfer(struct hsspi *hsspi, const void *tx, void *rx, break; } while ((ret == -EAGAIN) && (--retry > 0)); + hsspi->wakeup_release(hsspi); + + if (!(hsspi->soc->flags & STC_SOC_RDY) || (hsspi->soc->flags == 0xff)) { + dev_err(&hsspi->spi->dev, "FW not ready (flags %#02x)\n", + hsspi->soc->flags); + } + return ret; } |