summaryrefslogtreecommitdiff
path: root/include/linux/input-polldev.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2010-02-11 00:55:28 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2010-02-11 00:55:28 (GMT)
commit84abd88a70090cf00f9e45c3a81680874f17626e (patch)
tree4f58b80057f6e1f5817af1dc33a5458b3dfc9a99 /include/linux/input-polldev.h
parent13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff)
parente28cab42f384745c8a947a9ccd51e4aae52f5d51 (diff)
downloadlinux-fsl-qoriq-84abd88a70090cf00f9e45c3a81680874f17626e.tar.xz
Merge remote branch 'linus/master' into x86/bootmem
Diffstat (limited to 'include/linux/input-polldev.h')
-rw-r--r--include/linux/input-polldev.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/include/linux/input-polldev.h b/include/linux/input-polldev.h
index 597a007..5e3dddf 100644
--- a/include/linux/input-polldev.h
+++ b/include/linux/input-polldev.h
@@ -14,12 +14,19 @@
/**
* 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.
+ * @poll_interval: specifies how often the poll() method should be called.
+ * Defaults to 500 msec unless overriden when registering the device.
+ * @poll_interval_max: specifies upper bound for the poll interval.
+ * Defaults to the initial value of @poll_interval.
+ * @poll_interval_min: specifies lower bound for the poll interval.
+ * Defaults to 0.
* @input: input device structire associated with the polled device.
* Must be properly initialized by the driver (id, name, phys, bits).
*
@@ -30,11 +37,16 @@
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 */
+ unsigned int poll_interval_max; /* msec */
+ unsigned int poll_interval_min; /* msec */
struct input_dev *input;
+
+/* private: */
struct delayed_work work;
};