Files
kernel_oneplus_sm8250/include/linux/input/touch_event_notify.h
Rick Huang cb4493d8b8 input: touchscreen: st: add touch notification when suspend
When tap or swipe in a dedicated region, tp driver will notify
the subsystem/driver who has registered.
And this feature is not enabled by default; write the sysfs node
to enable it by demand.

Change-Id: Ie6312e8a0680b0abb9fed9a647bc9cee36985286
Signed-off-by: Rick Huang <rhuang@codeaurora.org>
Signed-off-by: Fei Mao <feim1@codeaurora.org>
2019-04-08 09:09:06 +08:00

34 lines
867 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
*/
#ifndef _TOUCHEVENTNOTIFY_H
#define _TOUCHEVENTNOTIFY_H
struct touch_event {
struct timeval time;
int x;
int y;
int fid; /* Finger ID */
char type; /* 'D' - Down, 'M' - Move, 'U' - Up, */
};
#define EVENT_TYPE_DOWN 'D'
#define EVENT_TYPE_MOVE 'M'
#define EVENT_TYPE_UP 'U'
/* caller API */
int touch_event_register_notifier(struct notifier_block *nb);
int touch_event_unregister_notifier(struct notifier_block *nb);
/* callee API */
void touch_event_call_notifier(unsigned long action, void *data);
#endif