drivers: gpio: nrf: use nrf_gpio_pin_retain_enable|disable

Instead of raw register access.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2024-11-21 10:47:43 +01:00 committed by Benjamin Cabé
parent 4036d6edb3
commit fa46eec157

View file

@ -71,7 +71,7 @@ static int gpio_nrfx_gpd_retain_set(const struct device *port, uint32_t mask, gp
int ret;
if (flags & GPIO_OUTPUT) {
cfg->port->RETAINSET = mask;
nrf_gpio_port_retain_enable(cfg->port, mask);
}
ret = nrf_gpd_release(NRF_GPD_FAST_ACTIVE1);
@ -101,7 +101,7 @@ static int gpio_nrfx_gpd_retain_clear(const struct device *port, uint32_t mask)
return ret;
}
cfg->port->RETAINCLR = mask;
nrf_gpio_port_retain_disable(cfg->port, mask);
}
#else
ARG_UNUSED(port);