diff options
author | Samu Onkalo <samu.p.onkalo@nokia.com> | 2009-11-14 00:13:22 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2009-11-20 03:52:09 -0500 |
commit | dad725d089b94bce8bbc769b7471dcfba3fbda0e (patch) | |
tree | 5010ad0f241530511bd5e80b7f5437556527641a /include/linux/input-polldev.h | |
parent | bc8f1eaf68a8aa1d993492f1ad2d74502665f578 (diff) |
Input: input-polldev - add sysfs interface for controlling poll interval
Sysfs entry for reading and setting of the polling interval. If the
interval is set to 0, polling is stopped. Polling is restarted when
interval is changed to non-zero.
sysfs entries:
poll = current polling interval in msec (RW)
max = max allowed polling interval (RO)
min = min allowed polling interval (RO)
Minimum and maximum limit for interval can be set while setting up the
device.
Interval can be adjusted even if the input device is not currently open.
[dtor@mail.ru: add kernel doc markup for the new fields]
Signed-off-by: Samu Onkalo <samu.p.onkalo@nokia.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/input-polldev.h')
-rw-r--r-- | include/linux/input-polldev.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h index 5c0ec68a965e..5e3dddf8f562 100644 --- a/include/linux/input-polldev.h +++ b/include/linux/input-polldev.h | |||
@@ -21,7 +21,12 @@ | |||
21 | * longer being polled. Used to put device into low power mode. | 21 | * longer being polled. Used to put device into low power mode. |
22 | * @poll: driver-supplied method that polls the device and posts | 22 | * @poll: driver-supplied method that polls the device and posts |
23 | * input events (mandatory). | 23 | * input events (mandatory). |
24 | * @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. | ||
25 | * @input: input device structire associated with the polled device. | 30 | * @input: input device structire associated with the polled device. |
26 | * Must be properly initialized by the driver (id, name, phys, bits). | 31 | * Must be properly initialized by the driver (id, name, phys, bits). |
27 | * | 32 | * |
@@ -36,8 +41,12 @@ struct input_polled_dev { | |||
36 | void (*close)(struct input_polled_dev *dev); | 41 | void (*close)(struct input_polled_dev *dev); |
37 | void (*poll)(struct input_polled_dev *dev); | 42 | void (*poll)(struct input_polled_dev *dev); |
38 | 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 */ | ||
39 | 46 | ||
40 | struct input_dev *input; | 47 | struct input_dev *input; |
48 | |||
49 | /* private: */ | ||
41 | struct delayed_work work; | 50 | struct delayed_work work; |
42 | }; | 51 | }; |
43 | 52 | ||