From be5cb7af7cab7c23e59648b95c00b1fa54ed588e Mon Sep 17 00:00:00 2001 From: Fabio Baltieri Date: Mon, 13 Nov 2023 18:18:29 +0000 Subject: [PATCH] input: kbd_matrix: move the header to the project wide include directory Move the input_kbd_matrix.h header out of drivers/ and into include/, this allows external drivers to use it and doxygen to pick it up. Signed-off-by: Fabio Baltieri --- drivers/input/input_kbd_matrix.c | 3 +-- drivers/input/input_npcx_kbd.c | 2 +- {drivers => include/zephyr}/input/input_kbd_matrix.h | 5 +++++ 3 files changed, 7 insertions(+), 3 deletions(-) rename {drivers => include/zephyr}/input/input_kbd_matrix.h (98%) diff --git a/drivers/input/input_kbd_matrix.c b/drivers/input/input_kbd_matrix.c index b642e59b80..f4c49d29d5 100644 --- a/drivers/input/input_kbd_matrix.c +++ b/drivers/input/input_kbd_matrix.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -15,8 +16,6 @@ #define LOG_LEVEL CONFIG_INPUT_LOG_LEVEL LOG_MODULE_REGISTER(input_kbd_matrix); -#include "input_kbd_matrix.h" - #define INPUT_KBD_MATRIX_ROW_MASK UINT8_MAX void input_kbd_matrix_poll_start(const struct device *dev) diff --git a/drivers/input/input_npcx_kbd.c b/drivers/input/input_npcx_kbd.c index 8cb408d621..1de14726a6 100644 --- a/drivers/input/input_npcx_kbd.c +++ b/drivers/input/input_npcx_kbd.c @@ -8,10 +8,10 @@ #define DT_DRV_COMPAT nuvoton_npcx_kbd #include "soc_miwu.h" -#include "input_kbd_matrix.h" #include #include +#include #include #include #include diff --git a/drivers/input/input_kbd_matrix.h b/include/zephyr/input/input_kbd_matrix.h similarity index 98% rename from drivers/input/input_kbd_matrix.h rename to include/zephyr/input/input_kbd_matrix.h index 06f2988902..0566f14d2c 100644 --- a/drivers/input/input_kbd_matrix.h +++ b/include/zephyr/input/input_kbd_matrix.h @@ -4,6 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ +#ifndef ZEPHYR_INCLUDE_INPUT_KBD_MATRIX_H_ +#define ZEPHYR_INCLUDE_INPUT_KBD_MATRIX_H_ + /** * @brief Keyboard Matrix API * @defgroup input_kbd_matrix Keyboard Matrix API @@ -238,3 +241,5 @@ void input_kbd_matrix_poll_start(const struct device *dev); int input_kbd_matrix_common_init(const struct device *dev); /** @} */ + +#endif /* ZEPHYR_INCLUDE_INPUT_KBD_MATRIX_H_ */