aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 17:56:51 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 17:56:51 -0700
commit133309a89e7430f907ebe85e78906ee12c311727 (patch)
treedaa96e6e82b63c0ef1538dcbb455d13595a1c83d /include
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid (diff)
parentMerge branch 'next' into for-linus (diff)
downloadlinux-dev-133309a89e7430f907ebe85e78906ee12c311727.tar.xz
linux-dev-133309a89e7430f907ebe85e78906ee12c311727.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (52 commits) Input: bcm5974 - silence uninitialized variables warnings Input: wistron_btns - add keymap for AOpen 1557 Input: psmouse - use boolean type Input: i8042 - use platform_driver_probe Input: i8042 - use boolean type where it makes sense Input: i8042 - try disabling and re-enabling AUX port at close Input: pxa27x_keypad - allow modifying keymap from userspace Input: sunkbd - fix formatting Input: i8042 - bypass AUX IRQ delivery test on laptops Input: wacom_w8001 - simplify querying logic Input: atkbd - allow setting force-release bitmap via sysfs Input: w90p910_keypad - move a dereference below a NULL test Input: add twl4030_keypad driver Input: matrix-keypad - add function to build device keymap Input: tosakbd - fix cleaning up KEY_STROBEs after error Input: joydev - validate axis/button maps before clobbering current ones Input: xpad - add USB ID for the drumkit controller from Rock Band Input: w90p910_keypad - rename driver name to match platform Input: add new driver for Sentelic Finger Sensing Pad Input: psmouse - allow defining read-only attributes ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h9
-rw-r--r--include/linux/i2c/twl4030.h19
-rw-r--r--include/linux/input/eeti_ts.h9
-rw-r--r--include/linux/input/matrix_keypad.h32
-rw-r--r--include/linux/libps2.h1
-rw-r--r--include/linux/serio.h2
-rw-r--r--include/linux/wm97xx.h7
7 files changed, 67 insertions, 12 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index aebb81036db2..a28642975053 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -62,7 +62,7 @@ struct bus_type {
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
- struct dev_pm_ops *pm;
+ const struct dev_pm_ops *pm;
struct bus_type_private *p;
};
@@ -132,7 +132,7 @@ struct device_driver {
int (*resume) (struct device *dev);
struct attribute_group **groups;
- struct dev_pm_ops *pm;
+ const struct dev_pm_ops *pm;
struct driver_private *p;
};
@@ -200,7 +200,8 @@ struct class {
int (*suspend)(struct device *dev, pm_message_t state);
int (*resume)(struct device *dev);
- struct dev_pm_ops *pm;
+ const struct dev_pm_ops *pm;
+
struct class_private *p;
};
@@ -291,7 +292,7 @@ struct device_type {
char *(*nodename)(struct device *dev);
void (*release)(struct device *dev);
- struct dev_pm_ops *pm;
+ const struct dev_pm_ops *pm;
};
/* interface for exporting device attributes */
diff --git a/include/linux/i2c/twl4030.h b/include/linux/i2c/twl4030.h
index 0dc80ef24975..3fd21d7cb6bf 100644
--- a/include/linux/i2c/twl4030.h
+++ b/include/linux/i2c/twl4030.h
@@ -25,6 +25,9 @@
#ifndef __TWL4030_H_
#define __TWL4030_H_
+#include <linux/types.h>
+#include <linux/input/matrix_keypad.h>
+
/*
* Using the twl4030 core we address registers using a pair
* { module id, relative register offset }
@@ -302,13 +305,17 @@ struct twl4030_madc_platform_data {
int irq_line;
};
+/* Boards have uniqe mappings of {col, row} --> keycode.
+ * Column and row are 4 bits, but range only from 0..7.
+ * a PERSISTENT_KEY is "always on" and never reported.
+ */
+#define PERSISTENT_KEY(c, r) KEY((c), (r), KEY_RESERVED)
+
struct twl4030_keypad_data {
- int rows;
- int cols;
- int *keymap;
- int irq;
- unsigned int keymapsize;
- unsigned int rep:1;
+ const struct matrix_keymap_data *keymap_data;
+ unsigned rows;
+ unsigned cols;
+ bool rep;
};
enum twl4030_usb_mode {
diff --git a/include/linux/input/eeti_ts.h b/include/linux/input/eeti_ts.h
new file mode 100644
index 000000000000..f875b316249d
--- /dev/null
+++ b/include/linux/input/eeti_ts.h
@@ -0,0 +1,9 @@
+#ifndef LINUX_INPUT_EETI_TS_H
+#define LINUX_INPUT_EETI_TS_H
+
+struct eeti_ts_platform_data {
+ unsigned int irq_active_high;
+};
+
+#endif /* LINUX_INPUT_EETI_TS_H */
+
diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index 15d5903af2dd..b3cd42d50e16 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -63,4 +63,36 @@ struct matrix_keypad_platform_data {
bool wakeup;
};
+/**
+ * matrix_keypad_build_keymap - convert platform keymap into matrix keymap
+ * @keymap_data: keymap supplied by the platform code
+ * @row_shift: number of bits to shift row value by to advance to the next
+ * line in the keymap
+ * @keymap: expanded version of keymap that is suitable for use by
+ * matrix keyboad driver
+ * @keybit: pointer to bitmap of keys supported by input device
+ *
+ * This function converts platform keymap (encoded with KEY() macro) into
+ * an array of keycodes that is suitable for using in a standard matrix
+ * keyboard driver that uses row and col as indices.
+ */
+static inline void
+matrix_keypad_build_keymap(const struct matrix_keymap_data *keymap_data,
+ unsigned int row_shift,
+ unsigned short *keymap, unsigned long *keybit)
+{
+ int i;
+
+ for (i = 0; i < keymap_data->keymap_size; i++) {
+ unsigned int key = keymap_data->keymap[i];
+ unsigned int row = KEY_ROW(key);
+ unsigned int col = KEY_COL(key);
+ unsigned short code = KEY_VAL(key);
+
+ keymap[MATRIX_SCAN_CODE(row, col, row_shift)] = code;
+ __set_bit(code, keybit);
+ }
+ __clear_bit(KEY_RESERVED, keybit);
+}
+
#endif /* _MATRIX_KEYPAD_H */
diff --git a/include/linux/libps2.h b/include/linux/libps2.h
index b94534b7e266..fcf5fbe6a50c 100644
--- a/include/linux/libps2.h
+++ b/include/linux/libps2.h
@@ -44,6 +44,7 @@ struct ps2dev {
void ps2_init(struct ps2dev *ps2dev, struct serio *serio);
int ps2_sendbyte(struct ps2dev *ps2dev, unsigned char byte, int timeout);
void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout);
+int __ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command);
int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command);
int ps2_handle_ack(struct ps2dev *ps2dev, unsigned char data);
int ps2_handle_response(struct ps2dev *ps2dev, unsigned char data);
diff --git a/include/linux/serio.h b/include/linux/serio.h
index 126d24c9eaa8..a640bc2afe76 100644
--- a/include/linux/serio.h
+++ b/include/linux/serio.h
@@ -31,8 +31,6 @@ struct serio {
bool manual_bind;
bool registered; /* port has been fully registered with driver core */
- bool suspended; /* port is suspended */
-
struct serio_device_id id;
diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
index 6f69968eab24..0c9878123d5f 100644
--- a/include/linux/wm97xx.h
+++ b/include/linux/wm97xx.h
@@ -16,6 +16,12 @@
#include <linux/platform_device.h>
/*
+ * WM97xx variants
+ */
+#define WM97xx_GENERIC 0x0000
+#define WM97xx_WM1613 0x1613
+
+/*
* WM97xx AC97 Touchscreen registers
*/
#define AC97_WM97XX_DIGITISER1 0x76
@@ -283,6 +289,7 @@ struct wm97xx {
unsigned pen_is_down:1; /* Pen is down */
unsigned aux_waiting:1; /* aux measurement waiting */
unsigned pen_probably_down:1; /* used in polling mode */
+ u16 variant; /* WM97xx chip variant */
u16 suspend_mode; /* PRP in suspend mode */
};