Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=553a05b8821f5a6bc633e97187933e2157b2d291 Commit: 553a05b8821f5a6bc633e97187933e2157b2d291 Parent: 82ba56c273911f7eda79849cfa0fc2d2e5a3b75b Author: Márton Németh <[EMAIL PROTECTED]> AuthorDate: Mon Oct 22 00:56:52 2007 -0400 Committer: Dmitry Torokhov <[EMAIL PROTECTED]> CommitDate: Mon Oct 22 00:56:52 2007 -0400
Input: i8042 - export i8042_command() Export the i8042_command() function which manages the mutual exclusion with the help of the i8042_lock spinlock. This allows to access i8042 safely from other parts of the kernel. Signed-off-by: Márton Németh <[EMAIL PROTECTED]> Signed-off-by: Dmitry Torokhov <[EMAIL PROTECTED]> --- drivers/input/serio/i8042.c | 4 +++- drivers/input/serio/i8042.h | 22 ---------------------- include/linux/i8042.h | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index 11dafc0..1a0cea3 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -20,6 +20,7 @@ #include <linux/err.h> #include <linux/rcupdate.h> #include <linux/platform_device.h> +#include <linux/i8042.h> #include <asm/io.h> @@ -208,7 +209,7 @@ static int __i8042_command(unsigned char *param, int command) return 0; } -static int i8042_command(unsigned char *param, int command) +int i8042_command(unsigned char *param, int command) { unsigned long flags; int retval; @@ -219,6 +220,7 @@ static int i8042_command(unsigned char *param, int command) return retval; } +EXPORT_SYMBOL(i8042_command); /* * i8042_kbd_write() sends a byte out through the keyboard interface. diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index b3eb7a7..dd22d91 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h @@ -61,28 +61,6 @@ #define I8042_CTR_XLATE 0x40 /* - * Commands. - */ - -#define I8042_CMD_CTL_RCTR 0x0120 -#define I8042_CMD_CTL_WCTR 0x1060 -#define I8042_CMD_CTL_TEST 0x01aa - -#define I8042_CMD_KBD_DISABLE 0x00ad -#define I8042_CMD_KBD_ENABLE 0x00ae -#define I8042_CMD_KBD_TEST 0x01ab -#define I8042_CMD_KBD_LOOP 0x11d2 - -#define I8042_CMD_AUX_DISABLE 0x00a7 -#define I8042_CMD_AUX_ENABLE 0x00a8 -#define I8042_CMD_AUX_TEST 0x01a9 -#define I8042_CMD_AUX_SEND 0x10d4 -#define I8042_CMD_AUX_LOOP 0x11d3 - -#define I8042_CMD_MUX_PFX 0x0090 -#define I8042_CMD_MUX_SEND 0x1090 - -/* * Return codes. */ diff --git a/include/linux/i8042.h b/include/linux/i8042.h new file mode 100644 index 0000000..7907a72 --- /dev/null +++ b/include/linux/i8042.h @@ -0,0 +1,35 @@ +#ifndef _LINUX_I8042_H +#define _LINUX_I8042_H + +/* + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + + +/* + * Standard commands. + */ + +#define I8042_CMD_CTL_RCTR 0x0120 +#define I8042_CMD_CTL_WCTR 0x1060 +#define I8042_CMD_CTL_TEST 0x01aa + +#define I8042_CMD_KBD_DISABLE 0x00ad +#define I8042_CMD_KBD_ENABLE 0x00ae +#define I8042_CMD_KBD_TEST 0x01ab +#define I8042_CMD_KBD_LOOP 0x11d2 + +#define I8042_CMD_AUX_DISABLE 0x00a7 +#define I8042_CMD_AUX_ENABLE 0x00a8 +#define I8042_CMD_AUX_TEST 0x01a9 +#define I8042_CMD_AUX_SEND 0x10d4 +#define I8042_CMD_AUX_LOOP 0x11d3 + +#define I8042_CMD_MUX_PFX 0x0090 +#define I8042_CMD_MUX_SEND 0x1090 + +int i8042_command(unsigned char *param, int command); + +#endif - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html