soc: nordic: nrf54h: gpd: 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:57 +01:00 committed by Benjamin Cabé
commit e6b24df0af

View file

@ -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);
}
}