]> Git Repo - linux.git/blobdiff - include/linux/input-polldev.h
net: ip_queue_rcv_skb() helper
[linux.git] / include / linux / input-polldev.h
index 597a0077b3c5406becd7b27f789860b6f3ef0c28..5e3dddf8f562651f488dd4b3061fbfefabb98f7a 100644 (file)
 
 /**
  * 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).
  *
 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;
 };
 
This page took 0.036368 seconds and 4 git commands to generate.