From 2101ccc1b1ef8267e63286332aed34891943c7c7 Mon Sep 17 00:00:00 2001 From: Bitan Biswas Date: Tue, 12 Sep 2023 11:47:46 +0000 Subject: [PATCH] t23x: nv-public: add dt-bindings header Add t23x nv-public dt-bindings headers so that generic-dts compilation errors can be fixed. bug 4197981 Change-Id: I00f3a1f02540cfe5eeb4be51defe985d0857654f Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/t23x-public-dts/+/2978965 Reviewed-by: Laxman Dewangan Tested-by: Bitan Biswas Reviewed-on: https://git-master.nvidia.com/r/c/device/hardware/nvidia/tegra-public-dts/+/3168935 GVS: buildbot_gerritrpt Tested-by: Laxman Dewangan --- include/kernel/dt-bindings/input/input.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/kernel/dt-bindings/input/input.h diff --git a/include/kernel/dt-bindings/input/input.h b/include/kernel/dt-bindings/input/input.h new file mode 100644 index 0000000..bcf0ae1 --- /dev/null +++ b/include/kernel/dt-bindings/input/input.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * This header provides constants for most input bindings. + * + * Most input bindings include key code, matrix key code format. + * In most cases, key code and matrix key code format uses + * the standard values/macro defined in this header. + */ + +#ifndef _DT_BINDINGS_INPUT_INPUT_H +#define _DT_BINDINGS_INPUT_INPUT_H + +#include "linux-event-codes.h" + +#define MATRIX_KEY(row, col, code) \ + ((((row) & 0xFF) << 24) | (((col) & 0xFF) << 16) | ((code) & 0xFFFF)) + +#endif /* _DT_BINDINGS_INPUT_INPUT_H */