summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/input-polldev.h22
-rw-r--r--include/linux/input.h18
-rw-r--r--include/linux/input/matrix_keypad.h3
-rw-r--r--include/linux/serio.h1
-rw-r--r--include/linux/ucb1400.h4
5 files changed, 40 insertions, 8 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 @@
/**
* 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;
};
diff --git a/include/linux/input.h b/include/linux/input.h
index c2b1a7d244d9..7be8a6537b57 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -595,6 +595,8 @@ struct input_absinfo {
#define KEY_NUMERIC_STAR 0x20a
#define KEY_NUMERIC_POUND 0x20b
+#define KEY_CAMERA_FOCUS 0x210
+
/* We avoid low common keys in module aliases so they don't get huge. */
#define KEY_MIN_INTERESTING KEY_MUTE
#define KEY_MAX 0x2ff
@@ -677,6 +679,9 @@ struct input_absinfo {
#define SW_LINEOUT_INSERT 0x06 /* set = inserted */
#define SW_JACK_PHYSICAL_INSERT 0x07 /* set = mechanical switch set */
#define SW_VIDEOOUT_INSERT 0x08 /* set = inserted */
+#define SW_CAMERA_LENS_COVER 0x09 /* set = lens covered */
+#define SW_KEYPAD_SLIDE 0x0a /* set = keypad slide out */
+#define SW_FRONT_PROXIMITY 0x0b /* set = front proximity sensor active */
#define SW_MAX 0x0f
#define SW_CNT (SW_MAX+1)
@@ -890,7 +895,7 @@ struct ff_periodic_effect {
struct ff_envelope envelope;
__u32 custom_len;
- __s16 *custom_data;
+ __s16 __user *custom_data;
};
/**
@@ -1016,9 +1021,12 @@ struct ff_effect {
* @keycodesize: size of elements in keycode table
* @keycode: map of scancodes to keycodes for this device
* @setkeycode: optional method to alter current keymap, used to implement
- * sparse keymaps. If not supplied default mechanism will be used
+ * sparse keymaps. If not supplied default mechanism will be used.
+ * The method is being called while holding event_lock and thus must
+ * not sleep
* @getkeycode: optional method to retrieve current keymap. If not supplied
- * default mechanism will be used
+ * default mechanism will be used. The method is being called while
+ * holding event_lock and thus must not sleep
* @ff: force feedback structure associated with the device if device
* supports force feedback effects
* @repeat_key: stores key code of the last key pressed; used to implement
@@ -1035,6 +1043,7 @@ struct ff_effect {
* @absmin: minimum values for events coming from absolute axes
* @absfuzz: describes noisiness for axes
* @absflat: size of the center flat position (used by joydev)
+ * @absres: resolution used for events coming form absolute axes
* @open: this method is called when the very first user calls
* input_open_device(). The driver must prepare the device
* to start generating events (start polling thread,
@@ -1289,6 +1298,9 @@ void input_unregister_device(struct input_dev *);
int __must_check input_register_handler(struct input_handler *);
void input_unregister_handler(struct input_handler *);
+int input_handler_for_each_handle(struct input_handler *, void *data,
+ int (*fn)(struct input_handle *, void *));
+
int input_register_handle(struct input_handle *);
void input_unregister_handle(struct input_handle *);
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index b3cd42d50e16..3bd018baae20 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -41,6 +41,9 @@ struct matrix_keymap_data {
* @col_scan_delay_us: delay, measured in microseconds, that is
* needed before we can keypad after activating column gpio
* @debounce_ms: debounce interval in milliseconds
+ * @active_low: gpio polarity
+ * @wakeup: controls whether the device should be set up as wakeup
+ * source
*
* This structure represents platform-specific data that use used by
* matrix_keypad driver to perform proper initialization.
diff --git a/include/linux/serio.h b/include/linux/serio.h
index a640bc2afe76..e2f3044d4a4a 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -215,5 +215,6 @@ static inline void serio_unpin_driver(struct serio *serio)
#define SERIO_INEXIO 0x37
#define SERIO_TOUCHIT213 0x38
#define SERIO_W8001 0x39
+#define SERIO_DYNAPRO 0x3a
#endif
diff --git a/include/linux/ucb1400.h b/include/linux/ucb1400.h
index adb44066680c..1b4790911052 100644
--- a/include/linux/ucb1400.h
+++ b/include/linux/ucb1400.h
@@ -110,6 +110,10 @@ struct ucb1400 {
struct platform_device *ucb1400_gpio;
};
+struct ucb1400_pdata {
+ int irq;
+};
+
static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
{
return ac97->bus->ops->read(ac97, reg);