summaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index deef5ddd22..1a47929351 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1,5 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
+#define pr_fmt(fmt) "input: " fmt
+
#include <common.h>
#include <init.h>
#include <kfifo.h>
@@ -33,6 +35,15 @@ void input_report_key_event(struct input_device *idev, unsigned int code, int va
if (code > KEY_MAX)
return;
+ /*
+ * We don't use pr_debug here as we want to output the message
+ * to the log, even if CONFIG_COMPILE_LOGLEVEL < MSG_DEBUG and
+ * the DEBUG mcro wasn't defined for the file.
+ */
+ if (IS_ENABLED(CONFIG_INPUT_EVBUG))
+ pr_print(MSG_DEBUG, "Event. Dev: %s, Type: %d, Code: %d, Value: %d\n",
+ dev_name(idev->parent), EV_KEY, code, value);
+
if (value)
set_bit(code, idev->keys);
else