Skip to content

Commit 4eb7b9f

Browse files
krish2718dkalowsk
authored andcommitted
modules: nrf_wifi: Implement QSPI deinit
By default QSPI is uninitialized after every transaction, so, deinit is a no-op, but if QSPI_LOW_POWER is disabled, then we need to uninitialize the QSPI in the deinit. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 2b0876c commit 4eb7b9f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

modules/nrf_wifi/bus/qspi_if.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -528,14 +528,10 @@ static int qspi_device_init(const struct device *dev)
528528
return ret;
529529
}
530530

531-
static void qspi_device_uninit(const struct device *dev)
531+
static void _qspi_device_uninit(const struct device *dev)
532532
{
533533
bool last = true;
534534

535-
if (!IS_ENABLED(CONFIG_NRF70_QSPI_LOW_POWER)) {
536-
return;
537-
}
538-
539535
qspi_lock(dev);
540536

541537
#ifdef CONFIG_MULTITHREADING
@@ -568,6 +564,15 @@ static void qspi_device_uninit(const struct device *dev)
568564
qspi_unlock(dev);
569565
}
570566

567+
static void qspi_device_uninit(const struct device *dev)
568+
{
569+
if (!IS_ENABLED(CONFIG_NRF70_QSPI_LOW_POWER)) {
570+
return;
571+
}
572+
573+
_qspi_device_uninit(dev);
574+
}
575+
571576
/* QSPI send custom command.
572577
*
573578
* If this is used for both send and receive the buffer sizes must be
@@ -1191,7 +1196,7 @@ struct device qspi_perip = {
11911196

11921197
int qspi_deinit(void)
11931198
{
1194-
LOG_DBG("TODO : %s", __func__);
1199+
_qspi_device_uninit(&qspi_perip);
11951200

11961201
return 0;
11971202
}

0 commit comments

Comments
 (0)