Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf_fromlist] drivers: spi: nrfx_spim: set/clear pins retention #2249

Merged
merged 1 commit into from
Nov 13, 2024
Merged
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
12 changes: 12 additions & 0 deletions drivers/spi/spi_nrfx_spim.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/mem_mgmt/mem_attr.h>
#include <soc.h>
#ifdef CONFIG_SOC_NRF54H20_GPD
#include <nrf/gpd.h>
#endif
#ifdef CONFIG_SOC_NRF52832_ALLOW_SPIM_DESPITE_PAN_58
#include <nrfx_ppi.h>
#endif
Expand Down Expand Up @@ -592,6 +595,11 @@ static int spim_nrfx_pm_action(const struct device *dev,
/* nrfx_spim_init() will be called at configuration before
* the next transfer.
*/

#ifdef CONFIG_SOC_NRF54H20_GPD
nrf_gpd_retain_pins_set(dev_config->pcfg, false);
#endif

break;

case PM_DEVICE_ACTION_SUSPEND:
Expand All @@ -600,6 +608,10 @@ static int spim_nrfx_pm_action(const struct device *dev,
dev_data->initialized = false;
}

#ifdef CONFIG_SOC_NRF54H20_GPD
nrf_gpd_retain_pins_set(dev_config->pcfg, true);
#endif

ret = pinctrl_apply_state(dev_config->pcfg,
PINCTRL_STATE_SLEEP);
break;
Expand Down
Loading