1 /*
2  * Copyright (c) 2024 Renesas Electronics Corporation
3  * SPDX-License-Identifier: Apache-2.0
4  */
5 
6 #include <zephyr/drivers/pinctrl.h>
7 #include "r_ioport.h"
8 
pinctrl_configure_pin(const pinctrl_soc_pin_t * pin)9 static void pinctrl_configure_pin(const pinctrl_soc_pin_t *pin)
10 {
11 	uint32_t cfg = *(uint32_t *)&pin->config;
12 
13 	R_IOPORT_PinCfg(NULL, pin->port_pin, cfg);
14 }
15 
pinctrl_configure_pins(const pinctrl_soc_pin_t * pins,uint8_t pin_cnt,uintptr_t reg)16 int pinctrl_configure_pins(const pinctrl_soc_pin_t *pins, uint8_t pin_cnt, uintptr_t reg)
17 {
18 	ARG_UNUSED(reg);
19 
20 	for (uint8_t i = 0U; i < pin_cnt; i++) {
21 		pinctrl_configure_pin(pins++);
22 	}
23 
24 	return 0;
25 }
26