Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions modules/nrf_wifi/bus/qspi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1191,7 +1196,7 @@ struct device qspi_perip = {

int qspi_deinit(void)
{
LOG_DBG("TODO : %s", __func__);
_qspi_device_uninit(&qspi_perip);

return 0;
}
Expand Down
22 changes: 12 additions & 10 deletions modules/nrf_wifi/bus/rpu_hw_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ static int rpu_pwroff(void)
{
int ret;

ret = gpio_pin_set_dt(&bucken_spec, 0); /* BUCKEN = 0 */
ret = gpio_pin_set_dt(&iovdd_ctrl_spec, 0); /* IOVDD CNTRL = 0 */
if (ret) {
LOG_ERR("BUCKEN GPIO set failed...");
LOG_ERR("IOVDD GPIO set failed...");
return ret;
}

ret = gpio_pin_set_dt(&iovdd_ctrl_spec, 0); /* IOVDD CNTRL = 0 */
ret = gpio_pin_set_dt(&bucken_spec, 0); /* BUCKEN = 0 */
if (ret) {
LOG_ERR("IOVDD GPIO set failed...");
LOG_ERR("BUCKEN GPIO set failed...");
return ret;
}

Expand Down Expand Up @@ -503,21 +503,23 @@ int rpu_disable(void)
{
int ret;

ret = rpu_pwroff();
#ifdef CONFIG_NRF70_SR_COEX_RF_SWITCH
ret = sr_gpio_remove();
if (ret) {
goto out;
}
ret = rpu_gpio_remove();
#endif

ret = rpu_pwroff();
if (ret) {
goto out;
}

#ifdef CONFIG_NRF70_SR_COEX_RF_SWITCH
ret = sr_gpio_remove();
ret = rpu_gpio_remove();
if (ret) {
goto out;
}
#endif


qdev = NULL;
cfg = NULL;

Expand Down
4 changes: 1 addition & 3 deletions modules/nrf_wifi/bus/spi_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,7 @@ int spim_init(struct qspi_config *config)

int spim_deinit(void)
{
LOG_DBG("TODO : %s", __func__);

return 0;
return spi_release_dt(&spi_spec);
}

static void spim_addr_check(unsigned int addr, const void *data, unsigned int len)
Expand Down