| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * 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. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | #ifndef _INPUT_H |
|---|
| 9 | 6 | #define _INPUT_H |
|---|
| 10 | 7 | |
|---|
| 11 | 8 | #include <linux/time.h> |
|---|
| 12 | 9 | #include <linux/list.h> |
|---|
| 10 | +#include <linux/android_kabi.h> |
|---|
| 13 | 11 | #include <uapi/linux/input.h> |
|---|
| 14 | 12 | /* Implementation details, userspace should not care about these */ |
|---|
| 15 | 13 | #define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR |
|---|
| .. | .. |
|---|
| 23 | 21 | #include <linux/fs.h> |
|---|
| 24 | 22 | #include <linux/timer.h> |
|---|
| 25 | 23 | #include <linux/mod_devicetable.h> |
|---|
| 24 | + |
|---|
| 25 | +struct input_dev_poller; |
|---|
| 26 | 26 | |
|---|
| 27 | 27 | /** |
|---|
| 28 | 28 | * struct input_value - input value representation |
|---|
| .. | .. |
|---|
| 74 | 74 | * not sleep |
|---|
| 75 | 75 | * @ff: force feedback structure associated with the device if device |
|---|
| 76 | 76 | * supports force feedback effects |
|---|
| 77 | + * @poller: poller structure associated with the device if device is |
|---|
| 78 | + * set up to use polling mode |
|---|
| 77 | 79 | * @repeat_key: stores key code of the last key pressed; used to implement |
|---|
| 78 | 80 | * software autorepeat |
|---|
| 79 | 81 | * @timer: timer for software autorepeat |
|---|
| .. | .. |
|---|
| 159 | 161 | |
|---|
| 160 | 162 | struct ff_device *ff; |
|---|
| 161 | 163 | |
|---|
| 164 | + struct input_dev_poller *poller; |
|---|
| 165 | + |
|---|
| 162 | 166 | unsigned int repeat_key; |
|---|
| 163 | 167 | struct timer_list timer; |
|---|
| 164 | 168 | |
|---|
| .. | .. |
|---|
| 198 | 202 | bool devres_managed; |
|---|
| 199 | 203 | |
|---|
| 200 | 204 | 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); |
|---|
| 201 | 210 | }; |
|---|
| 202 | 211 | #define to_input_dev(d) container_of(d, struct input_dev, dev) |
|---|
| 203 | 212 | |
|---|
| .. | .. |
|---|
| 317 | 326 | |
|---|
| 318 | 327 | struct list_head h_list; |
|---|
| 319 | 328 | struct list_head node; |
|---|
| 329 | + |
|---|
| 330 | + ANDROID_KABI_RESERVE(1); |
|---|
| 320 | 331 | }; |
|---|
| 321 | 332 | |
|---|
| 322 | 333 | /** |
|---|
| .. | .. |
|---|
| 343 | 354 | |
|---|
| 344 | 355 | struct list_head d_node; |
|---|
| 345 | 356 | struct list_head h_node; |
|---|
| 357 | + |
|---|
| 358 | + ANDROID_KABI_RESERVE(1); |
|---|
| 346 | 359 | }; |
|---|
| 347 | 360 | |
|---|
| 348 | 361 | struct input_dev __must_check *input_allocate_device(void); |
|---|
| .. | .. |
|---|
| 374 | 387 | void input_unregister_device(struct input_dev *); |
|---|
| 375 | 388 | |
|---|
| 376 | 389 | 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); |
|---|
| 377 | 397 | |
|---|
| 378 | 398 | int __must_check input_register_handler(struct input_handler *); |
|---|
| 379 | 399 | void input_unregister_handler(struct input_handler *); |
|---|
| .. | .. |
|---|
| 540 | 560 | |
|---|
| 541 | 561 | int max_effects; |
|---|
| 542 | 562 | struct ff_effect *effects; |
|---|
| 563 | + |
|---|
| 564 | + ANDROID_KABI_RESERVE(1); |
|---|
| 565 | + |
|---|
| 543 | 566 | struct file *effect_owners[]; |
|---|
| 544 | 567 | }; |
|---|
| 545 | 568 | |
|---|