gpio: cleanup the nct38xx driver
Reorganize includes and fix the indentation of code.
Signed-off-by: Michał Barnaś <mb@semihalf.com>
diff --git a/drivers/gpio/gpio_nct38xx_port.c b/drivers/gpio/gpio_nct38xx_port.c
index 8e116b1..c2bc2ae 100644
--- a/drivers/gpio/gpio_nct38xx_port.c
+++ b/drivers/gpio/gpio_nct38xx_port.c
@@ -6,11 +6,10 @@
#define DT_DRV_COMPAT nuvoton_nct38xx_gpio_port
-#include <zephyr/drivers/gpio.h>
-
#include "gpio_nct38xx.h"
#include <zephyr/drivers/gpio/gpio_utils.h>
+#include <zephyr/drivers/gpio.h>
#include <zephyr/logging/log.h>
LOG_MODULE_DECLARE(gpio_ntc38xx, CONFIG_GPIO_LOG_LEVEL);
@@ -581,16 +580,16 @@
#define GPIO_NCT38XX_PORT_DEVICE_INSTANCE(inst) \
static const struct gpio_nct38xx_port_config gpio_nct38xx_port_cfg_##inst = { \
- .common = { .port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(inst) & \
- DT_INST_PROP(inst, pin_mask) }, \
+ .common = {.port_pin_mask = GPIO_PORT_PIN_MASK_FROM_DT_INST(inst) & \
+ DT_INST_PROP(inst, pin_mask)}, \
.nct38xx_dev = DEVICE_DT_GET(DT_INST_PARENT(inst)), \
.gpio_port = DT_INST_REG_ADDR(inst), \
.pinmux_mask = COND_CODE_1(DT_INST_NODE_HAS_PROP(inst, pinmux_mask), \
(DT_INST_PROP(inst, pinmux_mask)), (0)), \
}; \
- BUILD_ASSERT(!(DT_INST_REG_ADDR(inst) == 0 && \
- !(DT_INST_NODE_HAS_PROP(inst, pinmux_mask))), \
- "Port 0 should assign pinmux_mask property."); \
+ BUILD_ASSERT( \
+ !(DT_INST_REG_ADDR(inst) == 0 && !(DT_INST_NODE_HAS_PROP(inst, pinmux_mask))), \
+ "Port 0 should assign pinmux_mask property."); \
static struct gpio_nct38xx_port_data gpio_nct38xx_port_data_##inst; \
DEVICE_DT_INST_DEFINE(inst, gpio_nct38xx_port_init, NULL, &gpio_nct38xx_port_data_##inst, \
&gpio_nct38xx_port_cfg_##inst, POST_KERNEL, \