diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 10:59:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-25 10:59:01 -0400 |
commit | 3a99c6319064af3f2e18eb929f638d555dbf7a62 (patch) | |
tree | e611927f41142123dc8efed7e07a3a91151edb01 /include | |
parent | 1dfd166e93f98892aa4427069a23ed73259983c8 (diff) | |
parent | 49327ad2bbbaf1945d5ba431522201574219d150 (diff) |
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: (75 commits)
Input: wacom - specify Cinitq supported tools
Input: ab8500-ponkey - fix IRQ freeing in error path
Input: adp5588-keys - use more obvious i2c_device_id name string
Input: ad7877 - switch to using threaded IRQ
Input: ad7877 - use attribute group to control visibility of attributes
Input: serio - add support for PS2Mult multiplexer protocol
Input: wacom - properly enable runtime PM
Input: ad7877 - filter events where pressure is beyond the maximum
Input: ad7877 - implement EV_KEY:BTN_TOUCH reporting
Input: ad7877 - implement specified chip select behavior
Input: hp680_ts_input - use cancel_delayed_work_sync()
Input: mousedev - correct lockdep annotation
Input: ads7846 - switch to using threaded IRQ
Input: serio - support multiple child devices per single parent
Input: synaptics - simplify pass-through port handling
Input: add ROHM BU21013 touch panel controller support
Input: omap4-keypad - wake-up on events & long presses
Input: omap4-keypad - fix interrupt line configuration
Input: omap4-keypad - SYSCONFIG register configuration
Input: omap4-keypad - use platform device helpers
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/gameport.h | 4 | ||||
-rw-r--r-- | include/linux/input.h | 57 | ||||
-rw-r--r-- | include/linux/input/bu21013.h | 44 | ||||
-rw-r--r-- | include/linux/serio.h | 10 | ||||
-rw-r--r-- | include/media/rc-map.h | 2 |
5 files changed, 97 insertions, 20 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index 361d1cc288d0..b65a6f472775 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -53,9 +53,7 @@ struct gameport { | |||
53 | #define to_gameport_port(d) container_of(d, struct gameport, dev) | 53 | #define to_gameport_port(d) container_of(d, struct gameport, dev) |
54 | 54 | ||
55 | struct gameport_driver { | 55 | struct gameport_driver { |
56 | 56 | const char *description; | |
57 | void *private; | ||
58 | char *description; | ||
59 | 57 | ||
60 | int (*connect)(struct gameport *, struct gameport_driver *drv); | 58 | int (*connect)(struct gameport *, struct gameport_driver *drv); |
61 | int (*reconnect)(struct gameport *); | 59 | int (*reconnect)(struct gameport *); |
diff --git a/include/linux/input.h b/include/linux/input.h index d6ae1761be97..51af441f3a21 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -34,7 +34,7 @@ struct input_event { | |||
34 | * Protocol version. | 34 | * Protocol version. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #define EV_VERSION 0x010000 | 37 | #define EV_VERSION 0x010001 |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * IOCTLs (0x00 - 0x7f) | 40 | * IOCTLs (0x00 - 0x7f) |
@@ -56,25 +56,50 @@ struct input_absinfo { | |||
56 | __s32 resolution; | 56 | __s32 resolution; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | /** | ||
60 | * struct input_keymap_entry - used by EVIOCGKEYCODE/EVIOCSKEYCODE ioctls | ||
61 | * @scancode: scancode represented in machine-endian form. | ||
62 | * @len: length of the scancode that resides in @scancode buffer. | ||
63 | * @index: index in the keymap, may be used instead of scancode | ||
64 | * @flags: allows to specify how kernel should handle the request. For | ||
65 | * example, setting INPUT_KEYMAP_BY_INDEX flag indicates that kernel | ||
66 | * should perform lookup in keymap by @index instead of @scancode | ||
67 | * @keycode: key code assigned to this scancode | ||
68 | * | ||
69 | * The structure is used to retrieve and modify keymap data. Users have | ||
70 | * option of performing lookup either by @scancode itself or by @index | ||
71 | * in keymap entry. EVIOCGKEYCODE will also return scancode or index | ||
72 | * (depending on which element was used to perform lookup). | ||
73 | */ | ||
74 | struct input_keymap_entry { | ||
75 | #define INPUT_KEYMAP_BY_INDEX (1 << 0) | ||
76 | __u8 flags; | ||
77 | __u8 len; | ||
78 | __u16 index; | ||
79 | __u32 keycode; | ||
80 | __u8 scancode[32]; | ||
81 | }; | ||
82 | |||
59 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ | 83 | #define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ |
60 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ | 84 | #define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ |
61 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ | 85 | #define EVIOCGREP _IOR('E', 0x03, unsigned int[2]) /* get repeat settings */ |
62 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ | 86 | #define EVIOCSREP _IOW('E', 0x03, unsigned int[2]) /* set repeat settings */ |
63 | #define EVIOCGKEYCODE _IOR('E', 0x04, unsigned int[2]) /* get keycode */ | 87 | |
64 | #define EVIOCSKEYCODE _IOW('E', 0x04, unsigned int[2]) /* set keycode */ | 88 | #define EVIOCGKEYCODE _IOR('E', 0x04, struct input_keymap_entry) /* get keycode */ |
89 | #define EVIOCSKEYCODE _IOW('E', 0x04, struct input_keymap_entry) /* set keycode */ | ||
65 | 90 | ||
66 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ | 91 | #define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ |
67 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ | 92 | #define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ |
68 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ | 93 | #define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ |
69 | 94 | ||
70 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global keystate */ | 95 | #define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global key state */ |
71 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ | 96 | #define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ |
72 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ | 97 | #define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ |
73 | #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ | 98 | #define EVIOCGSW(len) _IOC(_IOC_READ, 'E', 0x1b, len) /* get all switch states */ |
74 | 99 | ||
75 | #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ | 100 | #define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ |
76 | #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ | 101 | #define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ |
77 | #define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ | 102 | #define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ |
78 | 103 | ||
79 | #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ | 104 | #define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ |
80 | #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ | 105 | #define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ |
@@ -1088,13 +1113,13 @@ struct input_mt_slot { | |||
1088 | * @keycodemax: size of keycode table | 1113 | * @keycodemax: size of keycode table |
1089 | * @keycodesize: size of elements in keycode table | 1114 | * @keycodesize: size of elements in keycode table |
1090 | * @keycode: map of scancodes to keycodes for this device | 1115 | * @keycode: map of scancodes to keycodes for this device |
1116 | * @getkeycode: optional legacy method to retrieve current keymap. | ||
1091 | * @setkeycode: optional method to alter current keymap, used to implement | 1117 | * @setkeycode: optional method to alter current keymap, used to implement |
1092 | * sparse keymaps. If not supplied default mechanism will be used. | 1118 | * sparse keymaps. If not supplied default mechanism will be used. |
1093 | * The method is being called while holding event_lock and thus must | 1119 | * The method is being called while holding event_lock and thus must |
1094 | * not sleep | 1120 | * not sleep |
1095 | * @getkeycode: optional method to retrieve current keymap. If not supplied | 1121 | * @getkeycode_new: transition method |
1096 | * default mechanism will be used. The method is being called while | 1122 | * @setkeycode_new: transition method |
1097 | * holding event_lock and thus must not sleep | ||
1098 | * @ff: force feedback structure associated with the device if device | 1123 | * @ff: force feedback structure associated with the device if device |
1099 | * supports force feedback effects | 1124 | * supports force feedback effects |
1100 | * @repeat_key: stores key code of the last key pressed; used to implement | 1125 | * @repeat_key: stores key code of the last key pressed; used to implement |
@@ -1168,10 +1193,16 @@ struct input_dev { | |||
1168 | unsigned int keycodemax; | 1193 | unsigned int keycodemax; |
1169 | unsigned int keycodesize; | 1194 | unsigned int keycodesize; |
1170 | void *keycode; | 1195 | void *keycode; |
1196 | |||
1171 | int (*setkeycode)(struct input_dev *dev, | 1197 | int (*setkeycode)(struct input_dev *dev, |
1172 | unsigned int scancode, unsigned int keycode); | 1198 | unsigned int scancode, unsigned int keycode); |
1173 | int (*getkeycode)(struct input_dev *dev, | 1199 | int (*getkeycode)(struct input_dev *dev, |
1174 | unsigned int scancode, unsigned int *keycode); | 1200 | unsigned int scancode, unsigned int *keycode); |
1201 | int (*setkeycode_new)(struct input_dev *dev, | ||
1202 | const struct input_keymap_entry *ke, | ||
1203 | unsigned int *old_keycode); | ||
1204 | int (*getkeycode_new)(struct input_dev *dev, | ||
1205 | struct input_keymap_entry *ke); | ||
1175 | 1206 | ||
1176 | struct ff_device *ff; | 1207 | struct ff_device *ff; |
1177 | 1208 | ||
@@ -1478,10 +1509,12 @@ INPUT_GENERATE_ABS_ACCESSORS(fuzz, fuzz) | |||
1478 | INPUT_GENERATE_ABS_ACCESSORS(flat, flat) | 1509 | INPUT_GENERATE_ABS_ACCESSORS(flat, flat) |
1479 | INPUT_GENERATE_ABS_ACCESSORS(res, resolution) | 1510 | INPUT_GENERATE_ABS_ACCESSORS(res, resolution) |
1480 | 1511 | ||
1481 | int input_get_keycode(struct input_dev *dev, | 1512 | int input_scancode_to_scalar(const struct input_keymap_entry *ke, |
1482 | unsigned int scancode, unsigned int *keycode); | 1513 | unsigned int *scancode); |
1514 | |||
1515 | int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke); | ||
1483 | int input_set_keycode(struct input_dev *dev, | 1516 | int input_set_keycode(struct input_dev *dev, |
1484 | unsigned int scancode, unsigned int keycode); | 1517 | const struct input_keymap_entry *ke); |
1485 | 1518 | ||
1486 | extern struct class input_class; | 1519 | extern struct class input_class; |
1487 | 1520 | ||
diff --git a/include/linux/input/bu21013.h b/include/linux/input/bu21013.h new file mode 100644 index 000000000000..e470d387dd49 --- /dev/null +++ b/include/linux/input/bu21013.h | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * Copyright (C) ST-Ericsson SA 2010 | ||
3 | * Author: Naveen Kumar G <naveen.gaddipati@stericsson.com> for ST-Ericsson | ||
4 | * License terms:GNU General Public License (GPL) version 2 | ||
5 | */ | ||
6 | |||
7 | #ifndef _BU21013_H | ||
8 | #define _BU21013_H | ||
9 | |||
10 | /** | ||
11 | * struct bu21013_platform_device - Handle the platform data | ||
12 | * @cs_en: pointer to the cs enable function | ||
13 | * @cs_dis: pointer to the cs disable function | ||
14 | * @irq_read_val: pointer to read the pen irq value function | ||
15 | * @x_max_res: xmax resolution | ||
16 | * @y_max_res: ymax resolution | ||
17 | * @touch_x_max: touch x max | ||
18 | * @touch_y_max: touch y max | ||
19 | * @cs_pin: chip select pin | ||
20 | * @irq: irq pin | ||
21 | * @ext_clk: external clock flag | ||
22 | * @x_flip: x flip flag | ||
23 | * @y_flip: y flip flag | ||
24 | * @wakeup: wakeup flag | ||
25 | * | ||
26 | * This is used to handle the platform data | ||
27 | */ | ||
28 | struct bu21013_platform_device { | ||
29 | int (*cs_en)(int reset_pin); | ||
30 | int (*cs_dis)(int reset_pin); | ||
31 | int (*irq_read_val)(void); | ||
32 | int x_max_res; | ||
33 | int y_max_res; | ||
34 | int touch_x_max; | ||
35 | int touch_y_max; | ||
36 | unsigned int cs_pin; | ||
37 | unsigned int irq; | ||
38 | bool ext_clk; | ||
39 | bool x_flip; | ||
40 | bool y_flip; | ||
41 | bool wakeup; | ||
42 | }; | ||
43 | |||
44 | #endif | ||
diff --git a/include/linux/serio.h b/include/linux/serio.h index b5552568178d..e26f4788845f 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h | |||
@@ -41,7 +41,9 @@ struct serio { | |||
41 | int (*start)(struct serio *); | 41 | int (*start)(struct serio *); |
42 | void (*stop)(struct serio *); | 42 | void (*stop)(struct serio *); |
43 | 43 | ||
44 | struct serio *parent, *child; | 44 | struct serio *parent; |
45 | struct list_head child_node; /* Entry in parent->children list */ | ||
46 | struct list_head children; | ||
45 | unsigned int depth; /* level of nesting in serio hierarchy */ | 47 | unsigned int depth; /* level of nesting in serio hierarchy */ |
46 | 48 | ||
47 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ | 49 | struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ |
@@ -54,10 +56,9 @@ struct serio { | |||
54 | #define to_serio_port(d) container_of(d, struct serio, dev) | 56 | #define to_serio_port(d) container_of(d, struct serio, dev) |
55 | 57 | ||
56 | struct serio_driver { | 58 | struct serio_driver { |
57 | void *private; | 59 | const char *description; |
58 | char *description; | ||
59 | 60 | ||
60 | struct serio_device_id *id_table; | 61 | const struct serio_device_id *id_table; |
61 | bool manual_bind; | 62 | bool manual_bind; |
62 | 63 | ||
63 | void (*write_wakeup)(struct serio *); | 64 | void (*write_wakeup)(struct serio *); |
@@ -197,5 +198,6 @@ static inline void serio_continue_rx(struct serio *serio) | |||
197 | #define SERIO_W8001 0x39 | 198 | #define SERIO_W8001 0x39 |
198 | #define SERIO_DYNAPRO 0x3a | 199 | #define SERIO_DYNAPRO 0x3a |
199 | #define SERIO_HAMPSHIRE 0x3b | 200 | #define SERIO_HAMPSHIRE 0x3b |
201 | #define SERIO_PS2MULT 0x3c | ||
200 | 202 | ||
201 | #endif | 203 | #endif |
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index a9c041d49662..9b201ec8dc7f 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -35,7 +35,7 @@ struct ir_scancode_table { | |||
35 | unsigned int len; /* Used number of entries */ | 35 | unsigned int len; /* Used number of entries */ |
36 | unsigned int alloc; /* Size of *scan in bytes */ | 36 | unsigned int alloc; /* Size of *scan in bytes */ |
37 | u64 ir_type; | 37 | u64 ir_type; |
38 | char *name; | 38 | const char *name; |
39 | spinlock_t lock; | 39 | spinlock_t lock; |
40 | }; | 40 | }; |
41 | 41 | ||