From e6b24df0af681e8ab813f8e67b3d2e15c1ce93da Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Thu, 21 Nov 2024 10:47:57 +0100 Subject: [PATCH] soc: nordic: nrf54h: gpd: use nrf_gpio_pin_retain_enable|disable Instead of raw register access. Signed-off-by: Gerard Marull-Paretas --- soc/nordic/nrf54h/gpd/gpd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/soc/nordic/nrf54h/gpd/gpd.c b/soc/nordic/nrf54h/gpd/gpd.c index a4d1889e53f..540c1cb03bd 100644 --- a/soc/nordic/nrf54h/gpd/gpd.c +++ b/soc/nordic/nrf54h/gpd/gpd.c @@ -266,16 +266,15 @@ int nrf_gpd_retain_pins_set(const struct pinctrl_dev_config *pcfg, bool retain) for (uint8_t i = 0U; i < state->pin_cnt; i++) { uint32_t pin = NRF_GET_PIN(state->pins[i]); - NRF_GPIO_Type *reg = nrf_gpio_pin_port_decode(&pin); if (pin == NRF_PIN_DISCONNECTED) { continue; } if (retain) { - reg->RETAINSET = BIT(pin); + nrf_gpio_pin_retain_enable(pin); } else { - reg->RETAINCLR = BIT(pin); + nrf_gpio_pin_retain_disable(pin); } }