File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 1313#include <zephyr/linker/devicetree_regions.h>
1414#include <zephyr/cache.h>
1515#include <zephyr/mem_mgmt/mem_attr.h>
16+ #ifdef CONFIG_SOC_NRF54H20_GPD
17+ #include <nrf/gpd.h>
18+ #endif
1619
1720#include <zephyr/logging/log.h>
1821
@@ -274,6 +277,10 @@ static void pwm_resume(const struct device *dev)
274277
275278 (void )pinctrl_apply_state (config -> pcfg , PINCTRL_STATE_DEFAULT );
276279
280+ #ifdef CONFIG_SOC_NRF54H20_GPD
281+ nrf_gpd_retain_pins_set (config -> pcfg , false);
282+ #endif
283+
277284 for (size_t i = 0 ; i < NRF_PWM_CHANNEL_COUNT ; i ++ ) {
278285 uint32_t psel ;
279286
@@ -302,6 +309,10 @@ static void pwm_suspend(const struct device *dev)
302309 while (!nrfx_pwm_stopped_check (& config -> pwm )) {
303310 }
304311
312+ #ifdef CONFIG_SOC_NRF54H20_GPD
313+ nrf_gpd_retain_pins_set (config -> pcfg , true);
314+ #endif
315+
305316 memset (dev -> data , 0 , sizeof (struct pwm_nrfx_data ));
306317 (void )pinctrl_apply_state (config -> pcfg , PINCTRL_STATE_SLEEP );
307318}
You can’t perform that action at this time.
0 commit comments