From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- include/linux/input-hook.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 include/linux/input-hook.h (limited to 'include/linux/input-hook.h') diff --git a/include/linux/input-hook.h b/include/linux/input-hook.h new file mode 100644 index 00000000..6078e8d2 --- /dev/null +++ b/include/linux/input-hook.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2013 Spreadtrum Communications Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ +#ifndef __INPUT_HOOK_H +#define __INPUT_HOOK_H +#include +#include +#include +#include +#include +#include +#include +#include + +//#define HOOK_POWER_KEY + +struct trigger_watch_event { + bool initialized; + bool disable_timer; + bool disable_clk_source; + bool repeated; +#define TRIGGER_WATCH_EVENT_REPEATED (1 << 31) + u64 last_ts; /* last start timestamp */ + char *name; + int period; /* ms */ + struct hrtimer timer; + void (*trigger_watch_event_cb)(void *private); + void *private; +}; + +void trigger_watch_event_start(struct trigger_watch_event *event, int ms); +int trigger_watch_event_stop(struct trigger_watch_event *event); +void input_report_key_hook(struct input_dev *dev, unsigned int code, int value); +void input_hook_init(void); +void input_hook_exit(void); +#endif -- cgit v1.3.1