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 <Chaitanya.Tata@nordicsemi.no>
This commit is contained in:
parent
2b0876c850
commit
4eb7b9f06b
1 changed files with 11 additions and 6 deletions
|
@ -528,14 +528,10 @@ static int qspi_device_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void qspi_device_uninit(const struct device *dev)
|
||||
static void _qspi_device_uninit(const struct device *dev)
|
||||
{
|
||||
bool last = true;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_NRF70_QSPI_LOW_POWER)) {
|
||||
return;
|
||||
}
|
||||
|
||||
qspi_lock(dev);
|
||||
|
||||
#ifdef CONFIG_MULTITHREADING
|
||||
|
@ -568,6 +564,15 @@ static void qspi_device_uninit(const struct device *dev)
|
|||
qspi_unlock(dev);
|
||||
}
|
||||
|
||||
static void qspi_device_uninit(const struct device *dev)
|
||||
{
|
||||
if (!IS_ENABLED(CONFIG_NRF70_QSPI_LOW_POWER)) {
|
||||
return;
|
||||
}
|
||||
|
||||
_qspi_device_uninit(dev);
|
||||
}
|
||||
|
||||
/* QSPI send custom command.
|
||||
*
|
||||
* If this is used for both send and receive the buffer sizes must be
|
||||
|
@ -1191,7 +1196,7 @@ struct device qspi_perip = {
|
|||
|
||||
int qspi_deinit(void)
|
||||
{
|
||||
LOG_DBG("TODO : %s", __func__);
|
||||
_qspi_device_uninit(&qspi_perip);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue