hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/include/linux/input.h
....@@ -1,15 +1,13 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (c) 1999-2002 Vojtech Pavlik
3
- *
4
- * This program is free software; you can redistribute it and/or modify it
5
- * under the terms of the GNU General Public License version 2 as published by
6
- * the Free Software Foundation.
74 */
85 #ifndef _INPUT_H
96 #define _INPUT_H
107
118 #include <linux/time.h>
129 #include <linux/list.h>
10
+#include <linux/android_kabi.h>
1311 #include <uapi/linux/input.h>
1412 /* Implementation details, userspace should not care about these */
1513 #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
....@@ -23,6 +21,8 @@
2321 #include <linux/fs.h>
2422 #include <linux/timer.h>
2523 #include <linux/mod_devicetable.h>
24
+
25
+struct input_dev_poller;
2626
2727 /**
2828 * struct input_value - input value representation
....@@ -74,6 +74,8 @@
7474 * not sleep
7575 * @ff: force feedback structure associated with the device if device
7676 * supports force feedback effects
77
+ * @poller: poller structure associated with the device if device is
78
+ * set up to use polling mode
7779 * @repeat_key: stores key code of the last key pressed; used to implement
7880 * software autorepeat
7981 * @timer: timer for software autorepeat
....@@ -159,6 +161,8 @@
159161
160162 struct ff_device *ff;
161163
164
+ struct input_dev_poller *poller;
165
+
162166 unsigned int repeat_key;
163167 struct timer_list timer;
164168
....@@ -198,6 +202,11 @@
198202 bool devres_managed;
199203
200204 ktime_t timestamp[INPUT_CLK_MAX];
205
+
206
+ ANDROID_KABI_RESERVE(1);
207
+ ANDROID_KABI_RESERVE(2);
208
+ ANDROID_KABI_RESERVE(3);
209
+ ANDROID_KABI_RESERVE(4);
201210 };
202211 #define to_input_dev(d) container_of(d, struct input_dev, dev)
203212
....@@ -317,6 +326,8 @@
317326
318327 struct list_head h_list;
319328 struct list_head node;
329
+
330
+ ANDROID_KABI_RESERVE(1);
320331 };
321332
322333 /**
....@@ -343,6 +354,8 @@
343354
344355 struct list_head d_node;
345356 struct list_head h_node;
357
+
358
+ ANDROID_KABI_RESERVE(1);
346359 };
347360
348361 struct input_dev __must_check *input_allocate_device(void);
....@@ -374,6 +387,13 @@
374387 void input_unregister_device(struct input_dev *);
375388
376389 void input_reset_device(struct input_dev *);
390
+
391
+int input_setup_polling(struct input_dev *dev,
392
+ void (*poll_fn)(struct input_dev *dev));
393
+void input_set_poll_interval(struct input_dev *dev, unsigned int interval);
394
+void input_set_min_poll_interval(struct input_dev *dev, unsigned int interval);
395
+void input_set_max_poll_interval(struct input_dev *dev, unsigned int interval);
396
+int input_get_poll_interval(struct input_dev *dev);
377397
378398 int __must_check input_register_handler(struct input_handler *);
379399 void input_unregister_handler(struct input_handler *);
....@@ -540,6 +560,9 @@
540560
541561 int max_effects;
542562 struct ff_effect *effects;
563
+
564
+ ANDROID_KABI_RESERVE(1);
565
+
543566 struct file *effect_owners[];
544567 };
545568