diff options
author | Samu Onkalo <samu.p.onkalo@nokia.com> | 2009-10-18 00:38:57 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-10-18 00:46:49 -0700 |
commit | b0aba1e66c38d64be2c7dbf4b08c71857031ab67 (patch) | |
tree | 1691861b033ef42331b30711a466025719f357c8 /include | |
parent | bc09dcadc1a3da87d58aa70ebc8e9441205be75c (diff) | |
download | blackbird-op-linux-b0aba1e66c38d64be2c7dbf4b08c71857031ab67.tar.gz blackbird-op-linux-b0aba1e66c38d64be2c7dbf4b08c71857031ab67.zip |
Input: add open and close methods for polled devices
Optional open and close methods for preparing and closing
the device.
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/input-polldev.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 597a0077b3c5..5c0ec68a965e 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h @@ -14,9 +14,11 @@ /** * struct input_polled_dev - simple polled input device - * @private: private driver data - * @flush: driver-supplied method that flushes device's state upon - * opening (optional) + * @private: private driver data. + * @open: driver-supplied method that prepares device for polling + * (enabled the device and maybe flushes device state). + * @close: driver-supplied method that is called when device is no + * longer being polled. Used to put device into low power mode. * @poll: driver-supplied method that polls the device and posts * input events (mandatory). * @poll_interval: specifies how often the poll() method shoudl be called. @@ -30,7 +32,8 @@ struct input_polled_dev { void *private; - void (*flush)(struct input_polled_dev *dev); + void (*open)(struct input_polled_dev *dev); + void (*close)(struct input_polled_dev *dev); void (*poll)(struct input_polled_dev *dev); unsigned int poll_interval; /* msec */ |