Browse Source

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 <fabiobaltieri@google.com>
pull/65161/head
Fabio Baltieri 2 years ago committed by Carles Cufí
parent
commit
be5cb7af7c
  1. 3
      drivers/input/input_kbd_matrix.c
  2. 2
      drivers/input/input_npcx_kbd.c
  3. 5
      include/zephyr/input/input_kbd_matrix.h

3
drivers/input/input_kbd_matrix.c

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
#include <zephyr/device.h>
#include <zephyr/input/input.h>
#include <zephyr/input/input_kbd_matrix.h>
#include <zephyr/kernel.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
@ -15,8 +16,6 @@ @@ -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)

2
drivers/input/input_npcx_kbd.c

@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
#define DT_DRV_COMPAT nuvoton_npcx_kbd
#include "soc_miwu.h"
#include "input_kbd_matrix.h"
#include <zephyr/drivers/clock_control.h>
#include <zephyr/drivers/pinctrl.h>
#include <zephyr/input/input_kbd_matrix.h>
#include <zephyr/kernel.h>
#include <zephyr/logging/log.h>
#include <zephyr/sys/util.h>

5
drivers/input/input_kbd_matrix.h → include/zephyr/input/input_kbd_matrix.h

@ -4,6 +4,9 @@ @@ -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); @@ -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_ */
Loading…
Cancel
Save