Input: add support for polling to input devices
Separating "normal" and "polled" input devices was a mistake, as often we want to allow the very same device work on both interrupt-driven and polled mode, depending on the board on which the device is used. This introduces new APIs: - input_setup_polling - input_set_poll_interval - input_set_min_poll_interval - input_set_max_poll_interval These new APIs allow switching an input device into polled mode with sysfs attributes matching drivers using input_polled_dev APIs that will be eventually removed. Tested-by: Michal Vokáč <michal.vokac@ysoft.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
18
drivers/input/input-poller.h
Normal file
18
drivers/input/input-poller.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#ifndef _INPUT_POLLER_H
|
||||
#define _INPUT_POLLER_H
|
||||
|
||||
/*
|
||||
* Support for polling mode for input devices.
|
||||
*/
|
||||
#include <linux/sysfs.h>
|
||||
|
||||
struct input_dev_poller;
|
||||
|
||||
void input_dev_poller_finalize(struct input_dev_poller *poller);
|
||||
void input_dev_poller_start(struct input_dev_poller *poller);
|
||||
void input_dev_poller_stop(struct input_dev_poller *poller);
|
||||
|
||||
extern struct attribute_group input_poller_attribute_group;
|
||||
|
||||
#endif /* _INPUT_POLLER_H */
|
Reference in New Issue
Block a user