aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i8042.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-09-16 04:06:43 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-09-18 02:23:45 -0400
commit181d683d752c432635eda0f182ee71548c1f1820 (patch)
tree1fa397811ea6bcc73001fe1ab5b53525f2b88f74 /include/linux/i8042.h
parent0cb583fd2862f19ea88b02eb307d11c09e51e2f8 (diff)
Input: libps2 - additional locking for i8042 ports
The serio ports on i8042 are not completely isolated; while we provide enough locking to ensure proper serialization when accessing control and data registers AUX and KBD ports can still have an effect on each other on PS/2 protocol level. The most prominent effect is that issuing a command for the device connected to one port may cause abort of the command currently executing by the device connected to another port. Since i8042 nor serio subsystem are not aware of the details of the PS/2 protocol (length of the commands and their replies and so on) the locking should be done on libps2 level by adding special handling when we see that we are dealing with serio port on i8042. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'include/linux/i8042.h')
-rw-r--r--include/linux/i8042.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/include/linux/i8042.h b/include/linux/i8042.h
index 7907a72403ee..60c3360ef6ad 100644
--- a/include/linux/i8042.h
+++ b/include/linux/i8042.h
@@ -7,6 +7,7 @@
7 * the Free Software Foundation. 7 * the Free Software Foundation.
8 */ 8 */
9 9
10#include <linux/types.h>
10 11
11/* 12/*
12 * Standard commands. 13 * Standard commands.
@@ -30,6 +31,35 @@
30#define I8042_CMD_MUX_PFX 0x0090 31#define I8042_CMD_MUX_PFX 0x0090
31#define I8042_CMD_MUX_SEND 0x1090 32#define I8042_CMD_MUX_SEND 0x1090
32 33
34struct serio;
35
36#if defined(CONFIG_SERIO_I8042) || defined(CONFIG_SERIO_I8042_MODULE)
37
38void i8042_lock_chip(void);
39void i8042_unlock_chip(void);
33int i8042_command(unsigned char *param, int command); 40int i8042_command(unsigned char *param, int command);
41bool i8042_check_port_owner(const struct serio *);
42
43#else
44
45void i8042_lock_chip(void)
46{
47}
48
49void i8042_unlock_chip(void)
50{
51}
52
53int i8042_command(unsigned char *param, int command)
54{
55 return -ENOSYS;
56}
57
58bool i8042_check_port_owner(const struct serio *serio)
59{
60 return false;
61}
62
63#endif
34 64
35#endif 65#endif