diff options
author | Changki Kim <changki.kim@samsung.com> | 2020-09-02 17:54:56 +0900 |
---|---|---|
committer | Todd Kjos <tkjos@google.com> | 2020-09-08 18:04:18 +0000 |
commit | 72f2bc5fc24c8980315f9177db3b391036c4174f (patch) | |
tree | 2c6ffecb22c747d5ab3f1654f102a8e7c63279a7 | |
parent | a56472627739e5ea2f842bcbe5ac2ca0ab4e9ea9 (diff) |
ANDROID: vendor_hooks: Add vendor hooks for key combinationASB-2020-09-05_11-5.4
When some problems happened in android, we can't use adb command because
android can be abnormal state. And we can't use uart because
uart pin is not connected in the board. So we need key combination
functions for debugging.
This function should only use in development environment.
In the market, this will be disabled.
Bug: 167516783
Signed-off-by: Changki Kim <changki.kim@samsung.com>
Change-Id: I1cbbc93642fb45da161eee983380e48045153a66
[ Added "#ifdef __GENKSYMS__" around the include <<trace/hooks/debug.h>
to prevent CRC errors due to visibility of struct trace_eval_map ]
Signed-off-by: Todd Kjos <tkjos@google.com>
-rw-r--r-- | drivers/android/vendor_hooks.c | 1 | ||||
-rw-r--r-- | drivers/input/input.c | 5 | ||||
-rw-r--r-- | include/trace/hooks/debug.h | 8 |
3 files changed, 14 insertions, 0 deletions
diff --git a/drivers/android/vendor_hooks.c b/drivers/android/vendor_hooks.c index 7b4b1abbb537..0d3b4faa7bc7 100644 --- a/drivers/android/vendor_hooks.c +++ b/drivers/android/vendor_hooks.c @@ -55,3 +55,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_rwsem_list_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_futex_plist_add); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_is_fpsimd_save); EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_ipi_stop); +EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_input_handle_event); diff --git a/drivers/input/input.c b/drivers/input/input.c index e2eb9b9b8363..6434e0aec875 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -26,6 +26,10 @@ #include "input-compat.h" #include "input-poller.h" +#ifndef __GENKSYMS__ +#include <trace/hooks/debug.h> +#endif + MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>"); MODULE_DESCRIPTION("Input core"); MODULE_LICENSE("GPL"); @@ -438,6 +442,7 @@ void input_event(struct input_dev *dev, if (is_event_supported(type, dev->evbit, EV_MAX)) { spin_lock_irqsave(&dev->event_lock, flags); + trace_android_vh_input_handle_event(dev, type, code, value); input_handle_event(dev, type, code, value); spin_unlock_irqrestore(&dev->event_lock, flags); } diff --git a/include/trace/hooks/debug.h b/include/trace/hooks/debug.h index d3e310ec4b2d..d3127643ece8 100644 --- a/include/trace/hooks/debug.h +++ b/include/trace/hooks/debug.h @@ -12,11 +12,19 @@ #if defined(CONFIG_TRACEPOINTS) && defined(CONFIG_ANDROID_VENDOR_HOOKS) +struct pt_regs; DECLARE_HOOK(android_vh_ipi_stop, TP_PROTO(struct pt_regs *regs), TP_ARGS(regs)) + +struct input_dev; +DECLARE_HOOK(android_vh_input_handle_event, + TP_PROTO(struct input_dev *dev, unsigned int type, + unsigned int code, int value), + TP_ARGS(dev, type, code, value)) #else #define trace_android_vh_ipi_stop(regs) +#define trace_android_vh_input_handle_event(dev, type, code, value) #endif #endif /* _TRACE_HOOK_DEBUG_H */ |