From 7f1a5cce12f2d220fb7d915ccf2cf3cccf0706e1 Mon Sep 17 00:00:00 2001 From: Balaji Kulkarni Date: Fri, 21 Oct 2022 23:48:01 +0530 Subject: [PATCH] drivers: gpio: expose gpio_utils.h to external GPIO drivers Expose "gpio_utils.h" header for external GPIO drivers. Fixes #48609. Signed-off-by: Balaji Kulkarni --- drivers/gpio/gpio_andes_atcgpio100.c | 2 +- drivers/gpio/gpio_b91.c | 2 +- drivers/gpio/gpio_cc13xx_cc26xx.c | 2 +- drivers/gpio/gpio_cc32xx.c | 2 +- drivers/gpio/gpio_cmsdk_ahb.c | 2 +- drivers/gpio/gpio_creg_gpio.c | 2 +- drivers/gpio/gpio_cy8c95xx.c | 2 +- drivers/gpio/gpio_dw.c | 2 +- drivers/gpio/gpio_emul.c | 2 +- drivers/gpio/gpio_eos_s3.c | 2 +- drivers/gpio/gpio_esp32.c | 2 +- drivers/gpio/gpio_fxl6408.c | 2 +- drivers/gpio/gpio_gd32.c | 2 +- drivers/gpio/gpio_gecko.c | 2 +- drivers/gpio/gpio_imx.c | 2 +- drivers/gpio/gpio_intel.c | 2 +- drivers/gpio/gpio_ite_it8xxx2.c | 2 +- drivers/gpio/gpio_litex.c | 2 +- drivers/gpio/gpio_lmp90xxx.c | 2 +- drivers/gpio/gpio_lpc11u6x.c | 2 +- drivers/gpio/gpio_mchp_mss.c | 2 +- drivers/gpio/gpio_mchp_xec.c | 2 +- drivers/gpio/gpio_mchp_xec_v2.c | 2 +- drivers/gpio/gpio_mcp230xx.c | 2 +- drivers/gpio/gpio_mcp23s17.c | 2 +- drivers/gpio/gpio_mcp23sxx.c | 2 +- drivers/gpio/gpio_mcp23xxx.c | 2 +- drivers/gpio/gpio_mcux.c | 2 +- drivers/gpio/gpio_mcux_igpio.c | 2 +- drivers/gpio/gpio_mcux_lpc.c | 2 +- drivers/gpio/gpio_nct38xx_port.c | 2 +- drivers/gpio/gpio_neorv32.c | 2 +- drivers/gpio/gpio_npcx.c | 2 +- drivers/gpio/gpio_nrfx.c | 3 ++- drivers/gpio/gpio_pca953x.c | 2 +- drivers/gpio/gpio_pca95xx.c | 2 +- drivers/gpio/gpio_pcal6408a.c | 2 +- drivers/gpio/gpio_pcf8574.c | 2 +- drivers/gpio/gpio_psoc6.c | 2 +- drivers/gpio/gpio_rcar.c | 2 +- drivers/gpio/gpio_rpi_pico.c | 2 +- drivers/gpio/gpio_rv32m1.c | 2 +- drivers/gpio/gpio_sam.c | 2 +- drivers/gpio/gpio_sam0.c | 2 +- drivers/gpio/gpio_sam4l.c | 2 +- drivers/gpio/gpio_sifive.c | 2 +- drivers/gpio/gpio_smartbond.c | 2 +- drivers/gpio/gpio_sn74hc595.c | 2 +- drivers/gpio/gpio_stellaris.c | 2 +- drivers/gpio/gpio_stm32.c | 2 +- drivers/gpio/gpio_stmpe1600.c | 2 +- drivers/gpio/gpio_sx1509b.c | 2 +- drivers/gpio/gpio_xlnx_axi.c | 2 +- drivers/gpio/gpio_xlnx_ps.c | 2 +- drivers/gpio/gpio_xlnx_ps_bank.c | 2 +- drivers/gpio/gpio_xmc4xxx.c | 2 +- {drivers => include/zephyr/drivers}/gpio/gpio_utils.h | 9 +++------ 57 files changed, 60 insertions(+), 62 deletions(-) rename {drivers => include/zephyr/drivers}/gpio/gpio_utils.h (90%) diff --git a/drivers/gpio/gpio_andes_atcgpio100.c b/drivers/gpio/gpio_andes_atcgpio100.c index dd44c39ee1..4e81fc124c 100644 --- a/drivers/gpio/gpio_andes_atcgpio100.c +++ b/drivers/gpio/gpio_andes_atcgpio100.c @@ -19,7 +19,7 @@ #include #include -#include "gpio_utils.h" +#include #define DT_DRV_COMPAT andestech_atcgpio100 diff --git a/drivers/gpio/gpio_b91.c b/drivers/gpio/gpio_b91.c index 6aadb11999..45a82f7162 100644 --- a/drivers/gpio/gpio_b91.c +++ b/drivers/gpio/gpio_b91.c @@ -9,7 +9,7 @@ #include #include #include -#include "gpio_utils.h" +#include /* Driver dts compatibility: telink,b91_gpio */ diff --git a/drivers/gpio/gpio_cc13xx_cc26xx.c b/drivers/gpio/gpio_cc13xx_cc26xx.c index d4cef02cb7..9804fe57d5 100644 --- a/drivers/gpio/gpio_cc13xx_cc26xx.c +++ b/drivers/gpio/gpio_cc13xx_cc26xx.c @@ -24,7 +24,7 @@ #include #include -#include "gpio_utils.h" +#include /* bits 16-18 in iocfg registers correspond to interrupt settings */ #define IOCFG_INT_MASK 0x00070000 diff --git a/drivers/gpio/gpio_cc32xx.c b/drivers/gpio/gpio_cc32xx.c index b836dd1337..c575237003 100644 --- a/drivers/gpio/gpio_cc32xx.c +++ b/drivers/gpio/gpio_cc32xx.c @@ -26,7 +26,7 @@ #include #include -#include "gpio_utils.h" +#include /* Reserved */ #define PIN_XX 0xFF diff --git a/drivers/gpio/gpio_cmsdk_ahb.c b/drivers/gpio/gpio_cmsdk_ahb.c index 403311367a..160ac05c4e 100644 --- a/drivers/gpio/gpio_cmsdk_ahb.c +++ b/drivers/gpio/gpio_cmsdk_ahb.c @@ -17,7 +17,7 @@ #include #include -#include "gpio_utils.h" +#include /** * @brief GPIO driver for ARM CMSDK AHB GPIO diff --git a/drivers/gpio/gpio_creg_gpio.c b/drivers/gpio/gpio_creg_gpio.c index 3c935b2e72..6ce4113744 100644 --- a/drivers/gpio/gpio_creg_gpio.c +++ b/drivers/gpio/gpio_creg_gpio.c @@ -19,7 +19,7 @@ #include LOG_MODULE_REGISTER(creg_gpio, CONFIG_GPIO_LOG_LEVEL); -#include "gpio_utils.h" +#include /** Runtime driver data */ struct creg_gpio_drv_data { diff --git a/drivers/gpio/gpio_cy8c95xx.c b/drivers/gpio/gpio_cy8c95xx.c index f96f8b3fd6..c5a7585a2b 100644 --- a/drivers/gpio/gpio_cy8c95xx.c +++ b/drivers/gpio/gpio_cy8c95xx.c @@ -19,7 +19,7 @@ #include LOG_MODULE_REGISTER(cy8c95xx, CONFIG_GPIO_LOG_LEVEL); -#include "gpio_utils.h" +#include /** Cache of the output configuration and data of the pins. */ struct cy8c95xx_pin_state { diff --git a/drivers/gpio/gpio_dw.c b/drivers/gpio/gpio_dw.c index 9215de90f2..70020d6fa5 100644 --- a/drivers/gpio/gpio_dw.c +++ b/drivers/gpio/gpio_dw.c @@ -12,7 +12,7 @@ #include #include #include "gpio_dw.h" -#include "gpio_utils.h" +#include #include #include diff --git a/drivers/gpio/gpio_emul.c b/drivers/gpio/gpio_emul.c index 4295cd8ab8..a78c87bbcc 100644 --- a/drivers/gpio/gpio_emul.c +++ b/drivers/gpio/gpio_emul.c @@ -13,7 +13,7 @@ #include #include -#include "gpio_utils.h" +#include #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL #include diff --git a/drivers/gpio/gpio_eos_s3.c b/drivers/gpio/gpio_eos_s3.c index 82bd15ac87..9ad94fe07d 100644 --- a/drivers/gpio/gpio_eos_s3.c +++ b/drivers/gpio/gpio_eos_s3.c @@ -14,7 +14,7 @@ #include #include -#include "gpio_utils.h" +#include #define MAX_GPIOS 8U #define GPIOS_MASK (BIT(MAX_GPIOS) - 1) diff --git a/drivers/gpio/gpio_esp32.c b/drivers/gpio/gpio_esp32.c index 6e7598f59f..3f8026b07f 100644 --- a/drivers/gpio/gpio_esp32.c +++ b/drivers/gpio/gpio_esp32.c @@ -28,7 +28,7 @@ #include #include -#include "gpio_utils.h" +#include #include LOG_MODULE_REGISTER(gpio_esp32, CONFIG_LOG_DEFAULT_LEVEL); diff --git a/drivers/gpio/gpio_fxl6408.c b/drivers/gpio/gpio_fxl6408.c index 20cf7be4a5..164a4396c1 100644 --- a/drivers/gpio/gpio_fxl6408.c +++ b/drivers/gpio/gpio_fxl6408.c @@ -7,7 +7,7 @@ #include #include #include -#include "gpio_utils.h" +#include #include LOG_MODULE_REGISTER(fxl6408, CONFIG_FXL6408_LOG_LEVEL); diff --git a/drivers/gpio/gpio_gd32.c b/drivers/gpio/gpio_gd32.c index 498b9e3c71..c1e09a6f57 100644 --- a/drivers/gpio/gpio_gd32.c +++ b/drivers/gpio/gpio_gd32.c @@ -14,7 +14,7 @@ #include -#include "gpio_utils.h" +#include #ifdef CONFIG_GD32_HAS_AF_PINMUX /** SYSCFG DT node */ diff --git a/drivers/gpio/gpio_gecko.c b/drivers/gpio/gpio_gecko.c index e622d88021..8b3c482d19 100644 --- a/drivers/gpio/gpio_gecko.c +++ b/drivers/gpio/gpio_gecko.c @@ -12,7 +12,7 @@ #include #include -#include "gpio_utils.h" +#include #if CONFIG_GPIO_GECKO_COMMON_INIT_PRIORITY >= CONFIG_GPIO_INIT_PRIORITY #error CONFIG_GPIO_GECKO_COMMON_INIT_PRIORITY must be less than \ diff --git a/drivers/gpio/gpio_imx.c b/drivers/gpio/gpio_imx.c index b2048049c7..66d26d2a93 100644 --- a/drivers/gpio/gpio_imx.c +++ b/drivers/gpio/gpio_imx.c @@ -18,7 +18,7 @@ #include #endif -#include "gpio_utils.h" +#include struct imx_gpio_config { /* gpio_driver_config needs to be first */ diff --git a/drivers/gpio/gpio_intel.c b/drivers/gpio/gpio_intel.c index 24fab344b8..d33e3a8351 100644 --- a/drivers/gpio/gpio_intel.c +++ b/drivers/gpio/gpio_intel.c @@ -28,7 +28,7 @@ #include #include -#include "gpio_utils.h" +#include BUILD_ASSERT(DT_INST_IRQN(0) == 14); diff --git a/drivers/gpio/gpio_ite_it8xxx2.c b/drivers/gpio/gpio_ite_it8xxx2.c index 95e0b35c39..dcb55ee0b6 100644 --- a/drivers/gpio/gpio_ite_it8xxx2.c +++ b/drivers/gpio/gpio_ite_it8xxx2.c @@ -15,7 +15,7 @@ #include #include #include -#include "gpio_utils.h" +#include #include #include diff --git a/drivers/gpio/gpio_litex.c b/drivers/gpio/gpio_litex.c index 5e272d509e..d317803609 100644 --- a/drivers/gpio/gpio_litex.c +++ b/drivers/gpio/gpio_litex.c @@ -18,7 +18,7 @@ #include -#include "gpio_utils.h" +#include #define SUPPORTED_FLAGS (GPIO_INPUT | GPIO_OUTPUT | \ GPIO_OUTPUT_INIT_LOW | GPIO_OUTPUT_INIT_HIGH | \ diff --git a/drivers/gpio/gpio_lmp90xxx.c b/drivers/gpio/gpio_lmp90xxx.c index 8e01de2d79..1bd99d88cf 100644 --- a/drivers/gpio/gpio_lmp90xxx.c +++ b/drivers/gpio/gpio_lmp90xxx.c @@ -20,7 +20,7 @@ LOG_MODULE_REGISTER(gpio_lmp90xxx); #include -#include "gpio_utils.h" +#include struct gpio_lmp90xxx_config { /* gpio_driver_config needs to be first */ diff --git a/drivers/gpio/gpio_lpc11u6x.c b/drivers/gpio/gpio_lpc11u6x.c index d6b2e4707f..a44deceed9 100644 --- a/drivers/gpio/gpio_lpc11u6x.c +++ b/drivers/gpio/gpio_lpc11u6x.c @@ -22,7 +22,7 @@ #include -#include "gpio_utils.h" +#include /* Offset from syscon base address. */ #define LPC11U6X_PINTSEL_REGS 0x178 diff --git a/drivers/gpio/gpio_mchp_mss.c b/drivers/gpio/gpio_mchp_mss.c index 59e8b7b153..b5b3a7033d 100644 --- a/drivers/gpio/gpio_mchp_mss.c +++ b/drivers/gpio/gpio_mchp_mss.c @@ -14,7 +14,7 @@ #include #include -#include "gpio_utils.h" +#include #define MSS_GPIO_INPUT_MODE 0x02 diff --git a/drivers/gpio/gpio_mchp_xec.c b/drivers/gpio/gpio_mchp_xec.c index d90aae4703..f01aefd6d2 100644 --- a/drivers/gpio/gpio_mchp_xec.c +++ b/drivers/gpio/gpio_mchp_xec.c @@ -13,7 +13,7 @@ #include #include -#include "gpio_utils.h" +#include #define XEC_GPIO_EDGE_DLY_COUNT 4 diff --git a/drivers/gpio/gpio_mchp_xec_v2.c b/drivers/gpio/gpio_mchp_xec_v2.c index 2d1498f061..bd5b47b062 100644 --- a/drivers/gpio/gpio_mchp_xec_v2.c +++ b/drivers/gpio/gpio_mchp_xec_v2.c @@ -15,7 +15,7 @@ #include #include -#include "gpio_utils.h" +#include #define XEC_GPIO_EDGE_DLY_COUNT 4 diff --git a/drivers/gpio/gpio_mcp230xx.c b/drivers/gpio/gpio_mcp230xx.c index 3d1a1b477e..14759b0bb6 100644 --- a/drivers/gpio/gpio_mcp230xx.c +++ b/drivers/gpio/gpio_mcp230xx.c @@ -17,7 +17,7 @@ #include #include -#include "gpio_utils.h" +#include #include "gpio_mcp23xxx.h" #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL diff --git a/drivers/gpio/gpio_mcp23s17.c b/drivers/gpio/gpio_mcp23s17.c index 2f2629bc46..63008df369 100644 --- a/drivers/gpio/gpio_mcp23s17.c +++ b/drivers/gpio/gpio_mcp23s17.c @@ -19,7 +19,7 @@ #include #include -#include "gpio_utils.h" +#include #include "gpio_mcp23s17.h" #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL diff --git a/drivers/gpio/gpio_mcp23sxx.c b/drivers/gpio/gpio_mcp23sxx.c index bdfad2af7d..cbccf57e9c 100644 --- a/drivers/gpio/gpio_mcp23sxx.c +++ b/drivers/gpio/gpio_mcp23sxx.c @@ -17,7 +17,7 @@ #include #include -#include "gpio_utils.h" +#include #include "gpio_mcp23xxx.h" #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL diff --git a/drivers/gpio/gpio_mcp23xxx.c b/drivers/gpio/gpio_mcp23xxx.c index 5b159f6642..1d84514ff2 100644 --- a/drivers/gpio/gpio_mcp23xxx.c +++ b/drivers/gpio/gpio_mcp23xxx.c @@ -15,7 +15,7 @@ #include #include -#include "gpio_utils.h" +#include #include "gpio_mcp23xxx.h" #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL diff --git a/drivers/gpio/gpio_mcux.c b/drivers/gpio/gpio_mcux.c index bf3ad08bd1..5596bbee88 100644 --- a/drivers/gpio/gpio_mcux.c +++ b/drivers/gpio/gpio_mcux.c @@ -16,7 +16,7 @@ #include #include -#include "gpio_utils.h" +#include struct gpio_mcux_config { /* gpio_driver_config needs to be first */ diff --git a/drivers/gpio/gpio_mcux_igpio.c b/drivers/gpio/gpio_mcux_igpio.c index 4792051a8b..2e9de9a3c8 100644 --- a/drivers/gpio/gpio_mcux_igpio.c +++ b/drivers/gpio/gpio_mcux_igpio.c @@ -18,7 +18,7 @@ #include #endif -#include "gpio_utils.h" +#include struct gpio_pin_gaps { uint8_t start; diff --git a/drivers/gpio/gpio_mcux_lpc.c b/drivers/gpio/gpio_mcux_lpc.c index 87d2f03552..abefa85baa 100644 --- a/drivers/gpio/gpio_mcux_lpc.c +++ b/drivers/gpio/gpio_mcux_lpc.c @@ -20,7 +20,7 @@ #include #include #include -#include "gpio_utils.h" +#include #include #include #include diff --git a/drivers/gpio/gpio_nct38xx_port.c b/drivers/gpio/gpio_nct38xx_port.c index 429080c193..fabe3604ce 100644 --- a/drivers/gpio/gpio_nct38xx_port.c +++ b/drivers/gpio/gpio_nct38xx_port.c @@ -9,7 +9,7 @@ #include #include "gpio_nct38xx.h" -#include "gpio_utils.h" +#include #include LOG_MODULE_DECLARE(gpio_ntc38xx, CONFIG_GPIO_LOG_LEVEL); diff --git a/drivers/gpio/gpio_neorv32.c b/drivers/gpio/gpio_neorv32.c index 826d90f284..b448962bde 100644 --- a/drivers/gpio/gpio_neorv32.c +++ b/drivers/gpio/gpio_neorv32.c @@ -18,7 +18,7 @@ LOG_MODULE_REGISTER(gpio_neorv32, CONFIG_GPIO_LOG_LEVEL); -#include "gpio_utils.h" +#include /* Maximum number of GPIOs supported */ #define MAX_GPIOS 32 diff --git a/drivers/gpio/gpio_npcx.c b/drivers/gpio/gpio_npcx.c index 201c44b289..c29e43c351 100644 --- a/drivers/gpio/gpio_npcx.c +++ b/drivers/gpio/gpio_npcx.c @@ -11,7 +11,7 @@ #include #include -#include "gpio_utils.h" +#include #include "soc_gpio.h" #include "soc_miwu.h" diff --git a/drivers/gpio/gpio_nrfx.c b/drivers/gpio/gpio_nrfx.c index cbe1963d16..47657d3eda 100644 --- a/drivers/gpio/gpio_nrfx.c +++ b/drivers/gpio/gpio_nrfx.c @@ -10,7 +10,8 @@ #include #include #include -#include "gpio_utils.h" + +#include struct gpio_nrfx_data { /* gpio_driver_data needs to be first */ diff --git a/drivers/gpio/gpio_pca953x.c b/drivers/gpio/gpio_pca953x.c index b560888b8e..54a44ecb1c 100644 --- a/drivers/gpio/gpio_pca953x.c +++ b/drivers/gpio/gpio_pca953x.c @@ -21,7 +21,7 @@ #include LOG_MODULE_REGISTER(pca953x, CONFIG_GPIO_LOG_LEVEL); -#include "gpio_utils.h" +#include /* PCA953X Register addresses */ #define PCA953X_INPUT_PORT 0x00 diff --git a/drivers/gpio/gpio_pca95xx.c b/drivers/gpio/gpio_pca95xx.c index 0aad102fd7..3baccc43d8 100644 --- a/drivers/gpio/gpio_pca95xx.c +++ b/drivers/gpio/gpio_pca95xx.c @@ -22,7 +22,7 @@ #include #include -#include "gpio_utils.h" +#include #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL #include diff --git a/drivers/gpio/gpio_pcal6408a.c b/drivers/gpio/gpio_pcal6408a.c index 49c6fdc0e6..234701086e 100644 --- a/drivers/gpio/gpio_pcal6408a.c +++ b/drivers/gpio/gpio_pcal6408a.c @@ -9,7 +9,7 @@ #include #include #include -#include "gpio_utils.h" +#include #include LOG_MODULE_REGISTER(pcal6408a, CONFIG_GPIO_LOG_LEVEL); diff --git a/drivers/gpio/gpio_pcf8574.c b/drivers/gpio/gpio_pcf8574.c index 5344b79524..86b0406446 100644 --- a/drivers/gpio/gpio_pcf8574.c +++ b/drivers/gpio/gpio_pcf8574.c @@ -6,7 +6,7 @@ #define DT_DRV_COMPAT nxp_pcf8574 -#include "gpio_utils.h" +#include #include #include diff --git a/drivers/gpio/gpio_psoc6.c b/drivers/gpio/gpio_psoc6.c index 64d30810c2..4fd22d30ea 100644 --- a/drivers/gpio/gpio_psoc6.c +++ b/drivers/gpio/gpio_psoc6.c @@ -14,7 +14,7 @@ #include #include -#include "gpio_utils.h" +#include #include "cy_gpio.h" #include "cy_sysint.h" diff --git a/drivers/gpio/gpio_rcar.c b/drivers/gpio/gpio_rcar.c index 9256214f7c..b71b340e4c 100644 --- a/drivers/gpio/gpio_rcar.c +++ b/drivers/gpio/gpio_rcar.c @@ -16,7 +16,7 @@ #include #include -#include "gpio_utils.h" +#include typedef void (*init_func_t)(const struct device *dev); diff --git a/drivers/gpio/gpio_rpi_pico.c b/drivers/gpio/gpio_rpi_pico.c index ddeb82f7d2..e6c9cbcaba 100644 --- a/drivers/gpio/gpio_rpi_pico.c +++ b/drivers/gpio/gpio_rpi_pico.c @@ -13,7 +13,7 @@ #include #include -#include "gpio_utils.h" +#include #define DT_DRV_COMPAT raspberrypi_pico_gpio diff --git a/drivers/gpio/gpio_rv32m1.c b/drivers/gpio/gpio_rv32m1.c index c2212d7068..e6a26b273f 100644 --- a/drivers/gpio/gpio_rv32m1.c +++ b/drivers/gpio/gpio_rv32m1.c @@ -17,7 +17,7 @@ #include #include -#include "gpio_utils.h" +#include struct gpio_rv32m1_config { /* gpio_driver_config needs to be first */ diff --git a/drivers/gpio/gpio_sam.c b/drivers/gpio/gpio_sam.c index 10f145c9d0..f82c6f5cff 100644 --- a/drivers/gpio/gpio_sam.c +++ b/drivers/gpio/gpio_sam.c @@ -15,7 +15,7 @@ #include #include -#include "gpio_utils.h" +#include typedef void (*config_func_t)(const struct device *dev); diff --git a/drivers/gpio/gpio_sam0.c b/drivers/gpio/gpio_sam0.c index 3b915bc29e..03cfab48e6 100644 --- a/drivers/gpio/gpio_sam0.c +++ b/drivers/gpio/gpio_sam0.c @@ -14,7 +14,7 @@ #include #include -#include "gpio_utils.h" +#include #ifndef PORT_PMUX_PMUXE_A_Val #define PORT_PMUX_PMUXE_A_Val (0) diff --git a/drivers/gpio/gpio_sam4l.c b/drivers/gpio/gpio_sam4l.c index 5e3b0e2c7f..9a3029b289 100644 --- a/drivers/gpio/gpio_sam4l.c +++ b/drivers/gpio/gpio_sam4l.c @@ -15,7 +15,7 @@ #include #include -#include "gpio_utils.h" +#include typedef void (*config_func_t)(const struct device *dev); diff --git a/drivers/gpio/gpio_sifive.c b/drivers/gpio/gpio_sifive.c index 2f5f4d79ba..cd17d94879 100644 --- a/drivers/gpio/gpio_sifive.c +++ b/drivers/gpio/gpio_sifive.c @@ -18,7 +18,7 @@ #include #include -#include "gpio_utils.h" +#include typedef void (*sifive_cfg_func_t)(void); diff --git a/drivers/gpio/gpio_smartbond.c b/drivers/gpio/gpio_smartbond.c index ddf71fb44c..8bfa4f8d9a 100644 --- a/drivers/gpio/gpio_smartbond.c +++ b/drivers/gpio/gpio_smartbond.c @@ -6,7 +6,7 @@ #define DT_DRV_COMPAT renesas_smartbond_gpio -#include "gpio_utils.h" +#include #include #include diff --git a/drivers/gpio/gpio_sn74hc595.c b/drivers/gpio/gpio_sn74hc595.c index 24d7d2e59e..9127261060 100644 --- a/drivers/gpio/gpio_sn74hc595.c +++ b/drivers/gpio/gpio_sn74hc595.c @@ -16,7 +16,7 @@ #include #include -#include "gpio_utils.h" +#include #include LOG_MODULE_REGISTER(gpio_sn74hc595, CONFIG_GPIO_LOG_LEVEL); diff --git a/drivers/gpio/gpio_stellaris.c b/drivers/gpio/gpio_stellaris.c index e444fcf27f..433962e105 100644 --- a/drivers/gpio/gpio_stellaris.c +++ b/drivers/gpio/gpio_stellaris.c @@ -13,7 +13,7 @@ #include #include #include -#include "gpio_utils.h" +#include typedef void (*config_func_t)(const struct device *dev); diff --git a/drivers/gpio/gpio_stm32.c b/drivers/gpio/gpio_stm32.c index 362367db96..fd9781d666 100644 --- a/drivers/gpio/gpio_stm32.c +++ b/drivers/gpio/gpio_stm32.c @@ -25,7 +25,7 @@ #include "stm32_hsem.h" #include "gpio_stm32.h" -#include "gpio_utils.h" +#include /** * @brief Common GPIO driver for STM32 MCUs. diff --git a/drivers/gpio/gpio_stmpe1600.c b/drivers/gpio/gpio_stmpe1600.c index e62ff413a1..518b41c7c5 100644 --- a/drivers/gpio/gpio_stmpe1600.c +++ b/drivers/gpio/gpio_stmpe1600.c @@ -19,7 +19,7 @@ #include #include -#include "gpio_utils.h" +#include #define LOG_LEVEL CONFIG_GPIO_LOG_LEVEL #include diff --git a/drivers/gpio/gpio_sx1509b.c b/drivers/gpio/gpio_sx1509b.c index 3996a730f9..fcb690be50 100644 --- a/drivers/gpio/gpio_sx1509b.c +++ b/drivers/gpio/gpio_sx1509b.c @@ -24,7 +24,7 @@ #include LOG_MODULE_REGISTER(sx1509b, CONFIG_GPIO_LOG_LEVEL); -#include "gpio_utils.h" +#include /* Number of pins supported by the device */ #define NUM_PINS 16 diff --git a/drivers/gpio/gpio_xlnx_axi.c b/drivers/gpio/gpio_xlnx_axi.c index 1dfd8d3371..b86fd0ae35 100644 --- a/drivers/gpio/gpio_xlnx_axi.c +++ b/drivers/gpio/gpio_xlnx_axi.c @@ -11,7 +11,7 @@ #include #include -#include "gpio_utils.h" +#include /* AXI GPIO v2 register offsets (See Xilinx PG144 for details) */ #define GPIO_DATA_OFFSET 0x0000 diff --git a/drivers/gpio/gpio_xlnx_ps.c b/drivers/gpio/gpio_xlnx_ps.c index 2c9140e527..4520844678 100644 --- a/drivers/gpio/gpio_xlnx_ps.c +++ b/drivers/gpio/gpio_xlnx_ps.c @@ -9,7 +9,7 @@ #include #include #include -#include "gpio_utils.h" +#include #include "gpio_xlnx_ps.h" #include "gpio_xlnx_ps_bank.h" diff --git a/drivers/gpio/gpio_xlnx_ps_bank.c b/drivers/gpio/gpio_xlnx_ps_bank.c index 4258594a67..a20fc0923b 100644 --- a/drivers/gpio/gpio_xlnx_ps_bank.c +++ b/drivers/gpio/gpio_xlnx_ps_bank.c @@ -11,7 +11,7 @@ #include #include -#include "gpio_utils.h" +#include #include "gpio_xlnx_ps_bank.h" #define LOG_MODULE_NAME gpio_xlnx_ps_bank diff --git a/drivers/gpio/gpio_xmc4xxx.c b/drivers/gpio/gpio_xmc4xxx.c index 01a5d72cb0..029f0705e6 100644 --- a/drivers/gpio/gpio_xmc4xxx.c +++ b/drivers/gpio/gpio_xmc4xxx.c @@ -12,7 +12,7 @@ #include #include -#include "gpio_utils.h" +#include struct gpio_xmc4xxx_config { /* gpio_driver_config needs to be first, required by Zephyr */ diff --git a/drivers/gpio/gpio_utils.h b/include/zephyr/drivers/gpio/gpio_utils.h similarity index 90% rename from drivers/gpio/gpio_utils.h rename to include/zephyr/drivers/gpio/gpio_utils.h index 9f6108d5af..753640f4fb 100644 --- a/drivers/gpio/gpio_utils.h +++ b/include/zephyr/drivers/gpio/gpio_utils.h @@ -4,12 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -/** - * @file Header where utility code can be found for GPIO drivers - */ -#ifndef ZEPHYR_DRIVERS_GPIO_GPIO_UTILS_H_ -#define ZEPHYR_DRIVERS_GPIO_GPIO_UTILS_H_ +#ifndef ZEPHYR_INCLUDE_DRIVERS_GPIO_GPIO_UTILS_H_ +#define ZEPHYR_INCLUDE_DRIVERS_GPIO_GPIO_UTILS_H_ #include #include @@ -83,4 +80,4 @@ static inline void gpio_fire_callbacks(sys_slist_t *list, } } -#endif /* ZEPHYR_DRIVERS_GPIO_GPIO_UTILS_H_ */ +#endif /* ZEPHYR_INCLUDE_DRIVERS_GPIO_GPIO_UTILS_H_ */