diff options
Diffstat (limited to 'include/linux/input-polldev.h')
-rw-r--r-- | include/linux/input-polldev.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 597a0077b3c5..5e3dddf8f562 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h | |||
@@ -14,12 +14,19 @@ | |||
14 | 14 | ||
15 | /** | 15 | /** |
16 | * struct input_polled_dev - simple polled input device | 16 | * struct input_polled_dev - simple polled input device |
17 | * @private: private driver data | 17 | * @private: private driver data. |
18 | * @flush: driver-supplied method that flushes device's state upon | 18 | * @open: driver-supplied method that prepares device for polling |
19 | * opening (optional) | 19 | * (enabled the device and maybe flushes device state). |
20 | * @close: driver-supplied method that is called when device is no | ||
21 | * longer being polled. Used to put device into low power mode. | ||
20 | * @poll: driver-supplied method that polls the device and posts | 22 | * @poll: driver-supplied method that polls the device and posts |
21 | * input events (mandatory). | 23 | * input events (mandatory). |
22 | * @poll_interval: specifies how often the poll() method shoudl be called. | 24 | * @poll_interval: specifies how often the poll() method should be called. |
25 | * Defaults to 500 msec unless overriden when registering the device. | ||
26 | * @poll_interval_max: specifies upper bound for the poll interval. | ||
27 | * Defaults to the initial value of @poll_interval. | ||
28 | * @poll_interval_min: specifies lower bound for the poll interval. | ||
29 | * Defaults to 0. | ||
23 | * @input: input device structire associated with the polled device. | 30 | * @input: input device structire associated with the polled device. |
24 | * Must be properly initialized by the driver (id, name, phys, bits). | 31 | * Must be properly initialized by the driver (id, name, phys, bits). |
25 | * | 32 | * |
@@ -30,11 +37,16 @@ | |||
30 | struct input_polled_dev { | 37 | struct input_polled_dev { |
31 | void *private; | 38 | void *private; |
32 | 39 | ||
33 | void (*flush)(struct input_polled_dev *dev); | 40 | void (*open)(struct input_polled_dev *dev); |
41 | void (*close)(struct input_polled_dev *dev); | ||
34 | void (*poll)(struct input_polled_dev *dev); | 42 | void (*poll)(struct input_polled_dev *dev); |
35 | unsigned int poll_interval; /* msec */ | 43 | unsigned int poll_interval; /* msec */ |
44 | unsigned int poll_interval_max; /* msec */ | ||
45 | unsigned int poll_interval_min; /* msec */ | ||
36 | 46 | ||
37 | struct input_dev *input; | 47 | struct input_dev *input; |
48 | |||
49 | /* private: */ | ||
38 | struct delayed_work work; | 50 | struct delayed_work work; |
39 | }; | 51 | }; |
40 | 52 | ||