Commit 2dc34924 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Merge ucw.cz:/home/vojtech/bk/linus into ucw.cz:/home/vojtech/bk/input

parents cefeddf3 7d10ae4d
......@@ -493,9 +493,13 @@ static void fn_lastcons(struct vc_data *vc, struct pt_regs *regs)
static void fn_dec_console(struct vc_data *vc, struct pt_regs *regs)
{
int i;
int i, cur = fg_console;
/* Currently switching? Queue this next switch relative to that. */
if (want_console != -1)
cur = want_console;
for (i = fg_console-1; i != fg_console; i--) {
for (i = cur-1; i != cur; i--) {
if (i == -1)
i = MAX_NR_CONSOLES-1;
if (vc_cons_allocated(i))
......@@ -506,9 +510,13 @@ static void fn_dec_console(struct vc_data *vc, struct pt_regs *regs)
static void fn_inc_console(struct vc_data *vc, struct pt_regs *regs)
{
int i;
int i, cur = fg_console;
/* Currently switching? Queue this next switch relative to that. */
if (want_console != -1)
cur = want_console;
for (i = fg_console+1; i != fg_console; i++) {
for (i = cur+1; i != cur; i++) {
if (i == MAX_NR_CONSOLES)
i = 0;
if (vc_cons_allocated(i))
......@@ -941,14 +949,14 @@ static unsigned short x86_keycodes[256] =
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 93, 86, 87, 88, 94, 95, 85,259,375,260, 90,
284,285,309,311,312, 91,327,328,329,331,333,335,336,337,338,339,
367,288,302,304,350, 89,334,326,116,377,109,111,126,347,348,349,
360,261,262,263,298,376,100,101,321,316,373,286,289,102,351,355,
80, 81, 82, 83, 84,118, 86, 87, 88,115,120,119,121,112,123, 92,
284,285,309,298,312, 91,327,328,329,331,333,335,336,337,338,339,
367,288,302,304,350, 89,334,326,267,126,268,269,125,347,348,349,
360,261,262,263,268,376,100,101,321,316,373,286,289,102,351,355,
103,104,105,275,287,279,306,106,274,107,294,364,358,363,362,361,
291,108,381,281,290,272,292,305,280, 99,112,257,258,359,113,114,
264,117,271,374,379,115,125,273,121,123, 92,265,266,267,268,269,
120,119,118,277,278,282,283,295,296,297,299,300,301,293,303,307,
264,117,271,374,379,265,266, 93, 94, 95, 85,259,375,260, 90,116,
377,109,111,277,278,282,283,295,296,297,299,300,301,293,303,307,
308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330,
332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 };
......@@ -978,10 +986,10 @@ static int emulate_raw(struct vc_data *vc, unsigned int keycode,
put_queue(vc, 0x1d | up_flag);
put_queue(vc, 0x45 | up_flag);
return 0;
case KEY_LANG1:
case KEY_HANGUEL:
if (!up_flag) put_queue(vc, 0xf1);
return 0;
case KEY_LANG2:
case KEY_HANJA:
if (!up_flag) put_queue(vc, 0xf2);
return 0;
}
......
......@@ -143,7 +143,7 @@ static int joydev_fasync(int fd, struct file *file, int on)
static void joydev_free(struct joydev *joydev)
{
devfs_remove("js%d", joydev->minor);
devfs_remove("input/js%d", joydev->minor);
joydev_table[joydev->minor] = NULL;
class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
kfree(joydev);
......@@ -291,7 +291,7 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
struct joydev_list *list = file->private_data;
struct joydev *joydev = list->joydev;
struct input_dev *dev = joydev->handle.dev;
int i;
int i, j;
if (!joydev->exist) return -ENODEV;
......@@ -325,8 +325,14 @@ static int joydev_ioctl(struct inode *inode, struct file *file, unsigned int cmd
case JSIOCGBUTTONS:
return put_user(joydev->nkey, (__u8 *) arg);
case JSIOCSCORR:
return copy_from_user(joydev->corr, (struct js_corr *) arg,
sizeof(struct js_corr) * joydev->nabs) ? -EFAULT : 0;
if (copy_from_user(joydev->corr, (struct js_corr *)arg,
sizeof(struct js_corr) * joydev->nabs))
return -EFAULT;
for (i = 0; i < joydev->nabs; i++) {
j = joydev->abspam[i];
joydev->abs[i] = joydev_correct(dev->abs[j], joydev->corr + i);
}
return 0;
case JSIOCGCORR:
return copy_to_user((struct js_corr *) arg, joydev->corr,
sizeof(struct js_corr) * joydev->nabs) ? -EFAULT : 0;
......@@ -427,6 +433,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
j = joydev->abspam[i];
if (dev->absmax[j] == dev->absmin[j]) {
joydev->corr[i].type = JS_CORR_NONE;
joydev->abs[i] = dev->abs[j];
continue;
}
joydev->corr[i].type = JS_CORR_BROKEN;
......@@ -444,7 +451,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
joydev_table[minor] = joydev;
devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
S_IFCHR|S_IRUGO|S_IWUSR, "js%d", minor);
S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor);
class_simple_device_add(input_class,
MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
dev->dev, "js%d", minor);
......
......@@ -47,9 +47,9 @@ static unsigned char kbd98_keycode[256] = {
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 43, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 41, 26, 28, 30, 31, 32,
33, 34, 35, 36, 37, 38, 39, 40, 27, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 12, 57,184,109,104,110,111,103,105,106,108,102,107,
74, 98, 71, 72, 73, 55, 75, 76, 77, 78, 79, 80, 81,117, 82,124,
83,185, 87, 88, 85, 89, 90, 0, 0, 0, 0, 0, 0, 0,102, 0,
51, 52, 53, 12, 57, 92,109,104,110,111,103,105,106,108,102,107,
74, 98, 71, 72, 73, 55, 75, 76, 77, 78, 79, 80, 81,117, 82,121,
83, 94, 87, 88,183,184,185, 0, 0, 0, 0, 0, 0, 0,102, 0,
99,133, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 0, 0, 0, 0,
54, 58, 42, 56, 29
};
......
......@@ -48,8 +48,8 @@ MODULE_LICENSE("GPL");
static unsigned char amikbd_keycode[0x78] = {
41, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 43, 0, 82,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 0, 79, 80, 81,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 0, 75, 76, 77,
0, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 83, 71, 72, 73,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 43, 0, 75, 76, 77,
86, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 0, 83, 71, 72, 73,
57, 14, 15, 96, 28, 1,111, 0, 0, 0, 74, 0,103,108,106,105,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68,179,180, 98, 55, 78,138,
42, 54, 58, 29, 56,100,125,126
......
......@@ -38,7 +38,7 @@ MODULE_LICENSE("GPL");
static int atkbd_set = 2;
module_param_named(set, atkbd_set, int, 0);
MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3, 4)");
#if defined(__i386__) || defined (__x86_64__)
#if defined(__i386__) || defined(__x86_64__) || defined(__hppa__)
static int atkbd_reset;
#else
static int atkbd_reset = 1;
......@@ -57,15 +57,19 @@ MODULE_PARM_DESC(softrepeat, "Use software keyboard repeat");
* are loadable via an userland utility.
*/
#if defined(__hppa__)
#include "hpps2atkbd.h"
#else
static unsigned char atkbd_set2_keycode[512] = {
0, 67, 65, 63, 61, 59, 60, 88, 0, 68, 66, 64, 62, 15, 41,117,
0, 56, 42,182, 29, 16, 2, 0, 0, 0, 44, 31, 30, 17, 3, 0,
0, 46, 45, 32, 18, 5, 4,186, 0, 57, 47, 33, 20, 19, 6, 85,
0, 49, 48, 35, 34, 21, 7, 89, 0, 0, 50, 36, 22, 8, 9, 90,
0, 56, 42, 93, 29, 16, 2, 0, 0, 0, 44, 31, 30, 17, 3, 0,
0, 46, 45, 32, 18, 5, 4, 95, 0, 57, 47, 33, 20, 19, 6,183,
0, 49, 48, 35, 34, 21, 7,184, 0, 0, 50, 36, 22, 8, 9,185,
0, 51, 37, 23, 24, 11, 10, 0, 0, 52, 53, 38, 39, 25, 12, 0,
0,181, 40, 0, 26, 13, 0, 0, 58, 54, 28, 27, 0, 43, 0,194,
0, 86,193,192,184, 0, 14,185, 0, 79,182, 75, 71,124, 0, 0,
0, 89, 40, 0, 26, 13, 0, 0, 58, 54, 28, 27, 0, 43, 0, 85,
0, 86, 91, 90, 92, 0, 14, 94, 0, 79,124, 75, 71,121, 0, 0,
82, 83, 80, 76, 77, 72, 1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
......@@ -80,6 +84,8 @@ static unsigned char atkbd_set2_keycode[512] = {
0, 0, 0, 65, 99,
};
#endif
static unsigned char atkbd_set3_keycode[512] = {
0, 0, 0, 0, 0, 0, 0, 59, 1,138,128,129,130, 15, 41, 60,
......@@ -87,11 +93,11 @@ static unsigned char atkbd_set3_keycode[512] = {
134, 46, 45, 32, 18, 5, 4, 63,135, 57, 47, 33, 20, 19, 6, 64,
136, 49, 48, 35, 34, 21, 7, 65,137,100, 50, 36, 22, 8, 9, 66,
125, 51, 37, 23, 24, 11, 10, 67,126, 52, 53, 38, 39, 25, 12, 68,
113,114, 40, 84, 26, 13, 87, 99, 97, 54, 28, 27, 43, 84, 88, 70,
113,114, 40, 43, 26, 13, 87, 99, 97, 54, 28, 27, 43, 43, 88, 70,
108,105,119,103,111,107, 14,110, 0, 79,106, 75, 71,109,102,104,
82, 83, 80, 76, 77, 72, 69, 98, 0, 96, 81, 0, 78, 73, 55, 85,
82, 83, 80, 76, 77, 72, 69, 98, 0, 96, 81, 0, 78, 73, 55,183,
89, 90, 91, 92, 74,185,184,182, 0, 0, 0,125,126,127,112, 0,
184,185,186,187, 74, 94, 92, 93, 0, 0, 0,125,126,127,112, 0,
0,139,150,163,165,115,152,150,166,140,160,154,113,114,167,168,
148,149,147,140
};
......@@ -246,10 +252,10 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
atkbd->release = 1;
goto out;
case ATKBD_RET_HANGUEL:
atkbd_report_key(&atkbd->dev, regs, KEY_LANG1, 3);
atkbd_report_key(&atkbd->dev, regs, KEY_HANGUEL, 3);
goto out;
case ATKBD_RET_HANJA:
atkbd_report_key(&atkbd->dev, regs, KEY_LANG2, 3);
atkbd_report_key(&atkbd->dev, regs, KEY_HANJA, 3);
goto out;
case ATKBD_RET_ERR:
printk(KERN_WARNING "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys);
......@@ -272,6 +278,11 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
atkbd->release ? "released" : "pressed",
atkbd->translated ? "translated" : "raw",
atkbd->set, code, serio->phys);
if (atkbd->translated && atkbd->set == 2 && code == 0x7a)
printk(KERN_WARNING "atkbd.c: This is an XFree86 bug. It shouldn't access"
" hardware directly.\n");
else
printk(KERN_WARNING "atkbd.c: Use 'setkeycodes %s%02x <keycode>' to make it known.\n", code & 0x80 ? "e0" : "", code & 0x7f);
break;
default:
value = atkbd->release ? 0 :
......@@ -339,6 +350,10 @@ static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
if (command == ATKBD_CMD_RESET_BAT)
timeout = 2000000; /* 2 sec */
if (receive && param)
for (i = 0; i < receive; i++)
atkbd->cmdbuf[(receive - 1) - i] = param[i];
if (command & 0xff)
if (atkbd_sendbyte(atkbd, command & 0xff))
return (atkbd->cmdcnt = 0) - 1;
......@@ -390,7 +405,7 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int co
133, 149, 167, 182, 200, 217, 232, 250, 270, 303, 333, 370, 400, 435, 470, 500 };
const short delay[4] =
{ 250, 500, 750, 1000 };
char param[2];
unsigned char param[2];
int i, j;
if (!atkbd->write)
......@@ -400,7 +415,7 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int co
case EV_LED:
*param = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
| (test_bit(LED_NUML, dev->led) ? 2 : 0)
| (test_bit(LED_CAPSL, dev->led) ? 4 : 0);
atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS);
......@@ -461,6 +476,7 @@ static int atkbd_probe(struct atkbd *atkbd)
* should make sure we don't try to set the LEDs on it.
*/
param[0] = param[1] = 0xa5; /* initialize with invalid values */
if (atkbd_command(atkbd, param, ATKBD_CMD_GETID)) {
/*
......@@ -479,6 +495,11 @@ static int atkbd_probe(struct atkbd *atkbd)
return -1;
atkbd->id = (param[0] << 8) | param[1];
if (atkbd->id == 0xaca1 && atkbd->translated) {
printk(KERN_ERR "atkbd.c: NCD terminal keyboards are only supported on non-translating\n");
printk(KERN_ERR "atkbd.c: controllers. Use i8042.direct=1 to disable translation.\n");
return -1;
}
return 0;
}
......@@ -662,6 +683,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
if (atkbd_probe(atkbd)) {
serio_close(serio);
serio->private = NULL;
kfree(atkbd);
return;
}
......
/*
* drivers/input/keyboard/hpps2atkbd.h
*
* Copyright (c) 2004 Helge Deller <deller@gmx.de>
* Copyright (c) 2002 Laurent Canet <canetl@esiee.fr>
* Copyright (c) 2002 Thibaut Varene <varenet@esiee.fr>
*
* based on linux-2.4's hp_mouse.c & hp_keyb.c
* Copyright (c) 1999 Alex deVries <adevries@thepuffingroup.com>
* Copyright (c) 1999-2000 Philipp Rumpf <prumpf@tux.org>
* Copyright (c) 2000 Xavier Debacker <debackex@esiee.fr>
* Copyright (c) 2000-2001 Thomas Marteau <marteaut@esiee.fr>
*
* HP PS/2 AT-compatible Keyboard, found in PA/RISC Workstations
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*/
#define KBD_UNKNOWN 0
/* Raw SET 2 scancode table */
#if 0
/* conflicting keys between a RDI Precisionbook keyboard and a normal HP keyboard */
keytable[0x07] = KEY_F1; /* KEY_F12 */
keytable[0x11] = KEY_LEFTCTRL; /* KEY_LEFTALT */
keytable[0x14] = KEY_CAPSLOCK; /* KEY_LEFTCTRL */
keytable[0x61] = KEY_LEFT; /* KEY_102ND */
#endif
static unsigned char atkbd_set2_keycode[512] = {
/* 00 */ KBD_UNKNOWN, KEY_F9, KBD_UNKNOWN, KEY_F5, KEY_F3, KEY_F1, KEY_F2, KEY_F1,
/* 08 */ KEY_ESC, KEY_F10, KEY_F8, KEY_F6, KEY_F4, KEY_TAB, KEY_GRAVE, KEY_F2,
/* 10 */ KBD_UNKNOWN, KEY_LEFTCTRL, KEY_LEFTSHIFT, KBD_UNKNOWN, KEY_CAPSLOCK, KEY_Q, KEY_1, KEY_F3,
/* 18 */ KBD_UNKNOWN, KEY_LEFTALT, KEY_Z, KEY_S, KEY_A, KEY_W, KEY_2, KEY_F4,
/* 20 */ KBD_UNKNOWN, KEY_C, KEY_X, KEY_D, KEY_E, KEY_4, KEY_3, KEY_F5,
/* 28 */ KBD_UNKNOWN, KEY_SPACE, KEY_V, KEY_F, KEY_T, KEY_R, KEY_5, KEY_F6,
/* 30 */ KBD_UNKNOWN, KEY_N, KEY_B, KEY_H, KEY_G, KEY_Y, KEY_6, KEY_F7,
/* 38 */ KBD_UNKNOWN, KEY_RIGHTALT, KEY_M, KEY_J, KEY_U, KEY_7, KEY_8, KEY_F8,
/* 40 */ KBD_UNKNOWN, KEY_COMMA, KEY_K, KEY_I, KEY_O, KEY_0, KEY_9, KEY_F9,
/* 48 */ KBD_UNKNOWN, KEY_DOT, KEY_SLASH, KEY_L, KEY_SEMICOLON, KEY_P, KEY_MINUS, KEY_F10,
/* 50 */ KBD_UNKNOWN, KBD_UNKNOWN, KEY_APOSTROPHE,KBD_UNKNOWN, KEY_LEFTBRACE, KEY_EQUAL, KEY_F11, KEY_SYSRQ,
/* 58 */ KEY_CAPSLOCK, KEY_RIGHTSHIFT,KEY_ENTER, KEY_RIGHTBRACE,KEY_BACKSLASH, KEY_BACKSLASH,KEY_F12, KEY_SCROLLLOCK,
/* 60 */ KEY_DOWN, KEY_LEFT, KEY_PAUSE, KEY_UP, KEY_DELETE, KEY_END, KEY_BACKSPACE, KEY_INSERT,
/* 68 */ KBD_UNKNOWN, KEY_KP1, KEY_RIGHT, KEY_KP4, KEY_KP7, KEY_PAGEDOWN, KEY_HOME, KEY_PAGEUP,
/* 70 */ KEY_KP0, KEY_KPDOT, KEY_KP2, KEY_KP5, KEY_KP6, KEY_KP8, KEY_ESC, KEY_NUMLOCK,
/* 78 */ KEY_F11, KEY_KPPLUS, KEY_KP3, KEY_KPMINUS, KEY_KPASTERISK,KEY_KP9, KEY_SCROLLLOCK,KEY_103RD,
/* 80 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 88 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 90 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 98 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* a0 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* a8 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* b0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BD_UNKNOWN,
/* These are offset for escaped keycodes: */
/* 00 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KEY_F7, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 08 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KEY_LEFTMETA, KEY_RIGHTMETA, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 10 */ KBD_UNKNOWN, KEY_RIGHTALT, KBD_UNKNOWN, KBD_UNKNOWN, KEY_RIGHTCTRL, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 18 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 20 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 28 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 30 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 38 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 40 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* 48 */ KBD_UNKNOWN, KBD_UNKNOWN, KEY_KPSLASH, KBD_UNKNOWN, KBD_UNK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NOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* f0 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN,
/* f8 */ KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN, KBD_UNKNOWN
};
......@@ -20,13 +20,13 @@ static unsigned char dc_kbd_keycode[256] = {
0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
27, 43, 84, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
27, 43, 43, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 87, 88, 99, 70,119,110,102,104,111,107,109,106,
105,108,103, 69, 98, 55, 74, 78, 96, 79, 80, 81, 75, 76, 77, 71,
72, 73, 82, 83, 86,127,116,117, 85, 89, 90, 91, 92, 93, 94, 95,
120,121,122,123,134,138,130,132,128,129,131,137,133,135,136,113,
115,114, 0, 0, 0,124, 0,181,182,183,184,185,186,187,188,189,
190,191,192,193,194,195,196,197,198, 0, 0, 0, 0, 0, 0, 0,
72, 73, 82, 83, 86,127,116,117,183,184,185,186,187,188,189,190,
191,192,193,194,134,138,130,132,128,129,131,137,133,135,136,113,
115,114, 0, 0, 0,121, 0, 89, 93,124, 92, 94, 95, 0, 0, 0,
122,123, 90, 91, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
......
......@@ -150,7 +150,7 @@ static int ps2pp_detect_model(struct psmouse *psmouse, unsigned char *param)
static int logitech_wheel[] = { 52, 53, 75, 76, 80, 81, 83, 88, 112, -1 };
static int logitech_ps2pp[] = { 12, 13, 40, 41, 42, 43, 50, 51, 52, 53, 73, 75,
76, 80, 81, 83, 88, 96, 97, 112, -1 };
static int logitech_mx[] = { 112, -1 };
static int logitech_mx[] = { 61, 112, -1 };
psmouse->vendor = "Logitech";
psmouse->model = ((param[0] >> 4) & 0x07) | ((param[0] << 3) & 0x78);
......
......@@ -231,6 +231,11 @@ int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command)
if (command == PSMOUSE_CMD_RESET_BAT)
timeout = 4000000; /* 4 sec */
/* initialize cmdbuf with preset values from param */
if (receive)
for (i = 0; i < receive; i++)
psmouse->cmdbuf[(receive - 1) - i] = param[i];
if (command & 0xff)
if (psmouse_sendbyte(psmouse, command & 0xff))
return (psmouse->cmdcnt = 0) - 1;
......@@ -241,8 +246,9 @@ int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command)
while (psmouse->cmdcnt && timeout--) {
if (psmouse->cmdcnt == 1 && command == PSMOUSE_CMD_RESET_BAT)
timeout = 100000;
if (psmouse->cmdcnt == 1 && command == PSMOUSE_CMD_RESET_BAT &&
timeout > 100000) /* do not run in a endless loop */
timeout = 100000; /* 1 sec */
if (psmouse->cmdcnt == 1 && command == PSMOUSE_CMD_GETID &&
psmouse->cmdbuf[1] != 0xab && psmouse->cmdbuf[1] != 0xac) {
......@@ -410,7 +416,7 @@ static int psmouse_probe(struct psmouse *psmouse)
* in case of an IntelliMouse in 4-byte mode or 0x04 for IM Explorer.
*/
param[0] = param[1] = 0xa5;
param[0] = 0xa5;
if (psmouse_command(psmouse, param, PSMOUSE_CMD_GETID))
return -1;
......@@ -574,12 +580,14 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
serio->private = psmouse;
if (serio_open(serio, dev)) {
kfree(psmouse);
serio->private = NULL;
return;
}
if (psmouse_probe(psmouse) <= 0) {
serio_close(serio);
kfree(psmouse);
serio->private = NULL;
return;
}
......
......@@ -377,24 +377,16 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
unsigned long flags;
unsigned char str, data;
unsigned int dfl;
struct {
int data;
int str;
} buffer[I8042_BUFFER_SIZE];
int i, j = 0;
spin_lock_irqsave(&i8042_lock, flags);
while (j < I8042_BUFFER_SIZE &&
(buffer[j].str = i8042_read_status()) & I8042_STR_OBF)
buffer[j++].data = i8042_read_data();
str = i8042_read_status();
data = i8042_read_data();
spin_unlock_irqrestore(&i8042_lock, flags);
for (i = 0; i < j; i++) {
str = buffer[i].str;
data = buffer[i].data;
if (~str & I8042_STR_OBF) {
if (irq) dbg("Interrupt %d, without any data", irq);
return IRQ_RETVAL(0);
}
dfl = ((str & I8042_STR_PARITY) ? SERIO_PARITY : 0) |
((str & I8042_STR_TIMEOUT) ? SERIO_TIMEOUT : 0);
......@@ -416,7 +408,8 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
dfl & SERIO_TIMEOUT ? ", timeout" : "");
serio_interrupt(i8042_mux_port + ((str >> 6) & 3), data, dfl, regs);
continue;
goto irq_ret;
}
dbg("%02x <- i8042 (interrupt, %s, %d%s%s)",
......@@ -426,16 +419,18 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
serio_interrupt(&i8042_aux_port, data, dfl, regs);
continue;
goto irq_ret;
}
if (!i8042_kbd_values.exists)
continue;
goto irq_ret;
serio_interrupt(&i8042_kbd_port, data, dfl, regs);
}
return IRQ_RETVAL(j);
irq_ret:
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
return IRQ_RETVAL(1);
}
/*
......@@ -519,17 +514,8 @@ static int i8042_enable_mux_ports(struct i8042_values *values)
static int __init i8042_check_mux(struct i8042_values *values)
{
static int i8042_check_mux_cookie;
unsigned char mux_version;
/*
* Check if AUX irq is available.
*/
if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
"i8042", &i8042_check_mux_cookie))
return -1;
free_irq(values->irq, &i8042_check_mux_cookie);
if (i8042_enable_mux_mode(values, &mux_version))
return -1;
......@@ -635,6 +621,7 @@ static int __init i8042_port_register(struct i8042_values *values, struct serio
if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
printk(KERN_WARNING "i8042.c: Can't write CTR while registering.\n");
values->exists = 0;
return -1;
}
......@@ -653,7 +640,6 @@ static int __init i8042_port_register(struct i8042_values *values, struct serio
static void i8042_timer_func(unsigned long data)
{
i8042_interrupt(0, NULL, NULL);
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
}
......@@ -666,8 +652,6 @@ static void i8042_timer_func(unsigned long data)
static int i8042_controller_init(void)
{
if (i8042_noaux)
i8042_nomux = 1;
/*
* Test the i8042. We need to know if it thinks it's working correctly
* before doing anything else.
......@@ -939,6 +923,9 @@ int __init i8042_init(void)
dbg_init();
init_timer(&i8042_timer);
i8042_timer.function = i8042_timer_func;
if (i8042_platform_init())
return -EBUSY;
......@@ -951,20 +938,18 @@ int __init i8042_init(void)
if (i8042_dumbkbd)
i8042_kbd_port.write = NULL;
for (i = 0; i < 4; i++)
i8042_init_mux_values(i8042_mux_values + i, i8042_mux_port + i, i);
if (!i8042_noaux && !i8042_check_aux(&i8042_aux_values)) {
if (!i8042_nomux && !i8042_check_mux(&i8042_aux_values))
for (i = 0; i < 4; i++)
for (i = 0; i < 4; i++) {
i8042_init_mux_values(i8042_mux_values + i, i8042_mux_port + i, i);
i8042_port_register(i8042_mux_values + i, i8042_mux_port + i);
}
else
if (!i8042_noaux && !i8042_check_aux(&i8042_aux_values))
i8042_port_register(&i8042_aux_values, &i8042_aux_port);
}
i8042_port_register(&i8042_kbd_values, &i8042_kbd_port);
init_timer(&i8042_timer);
i8042_timer.function = i8042_timer_func;
mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
if (sysdev_class_register(&kbc_sysclass) == 0) {
......
......@@ -69,8 +69,8 @@ unsigned char adb_to_linux_keycodes[128] = {
22, 26, 23, 25, 28, 38, 36, 40, 37, 39, 43, 51, 53, 49, 50, 52,
15, 57, 41, 14, 96, 1, 29,125, 42, 58, 56,105,106,108,103, 0,
0, 83, 0, 55, 0, 78, 0, 69, 0, 0, 0, 98, 96, 0, 74, 0,
0,117, 82, 79, 80, 81, 75, 76, 77, 71, 0, 72, 73,183,181,124,
63, 64, 65, 61, 66, 67,191, 87,190, 99, 0, 70, 0, 68,101, 88,
0,117, 82, 79, 80, 81, 75, 76, 77, 71, 0, 72, 73,124, 89,121,
63, 64, 65, 61, 66, 67,123, 87,122, 99, 0, 70, 0, 68,101, 88,
0,119,110,102,104,111, 62,107, 60,109, 59, 54,100, 97,126,116
};
......
......@@ -1357,6 +1357,9 @@ void hid_init_reports(struct hid_device *hid)
#define USB_VENDOR_ID_BERKSHIRE 0x0c98
#define USB_DEVICE_ID_BERKSHIRE_PCWD 0x1140
#define USB_VENDOR_ID_ALPS 0x0433
#define USB_DEVICE_ID_IBM_GAMEPAD 0x1101
struct hid_blacklist {
__u16 idVendor;
__u16 idProduct;
......@@ -1407,6 +1410,7 @@ struct hid_blacklist {
{ USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK },
{ USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_ALPS, USB_DEVICE_ID_IBM_GAMEPAD, HID_QUIRK_BADPAD },
{ 0, 0 }
};
......@@ -1525,9 +1529,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
continue;
if (!(hid->urbout = usb_alloc_urb(0, GFP_KERNEL)))
goto fail;
pipe = usb_sndbulkpipe(dev, endpoint->bEndpointAddress);
usb_fill_bulk_urb(hid->urbout, dev, pipe, hid->outbuf, 0,
hid_irq_out, hid);
pipe = usb_sndintpipe(dev, endpoint->bEndpointAddress);
usb_fill_int_urb(hid->urbout, dev, pipe, hid->outbuf, 0,
hid_irq_out, hid, 1);
hid->urbout->transfer_dma = hid->outbuf_dma;
hid->urbout->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
}
......
......@@ -5,7 +5,7 @@
* Not all hid devices use the same protocol. For example, some use PID,
* other use their own proprietary procotol.
*
* Copyright (c) 2002 Johann Deneux
* Copyright (c) 2002-2004 Johann Deneux
*/
/*
......@@ -24,7 +24,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so by
* e-mail - mail your message to <deneux@ifrance.com>
* e-mail - mail your message to <johann.deneux@it.uu.se>
*/
#include <linux/input.h>
......@@ -52,8 +52,9 @@ struct hid_ff_initializer {
static struct hid_ff_initializer inits[] = {
#ifdef CONFIG_LOGITECH_FF
{0x46d, 0xc211, hid_lgff_init},
{0x46d, 0xc283, hid_lgff_init},
{0x46d, 0xc211, hid_lgff_init}, // Logitech Cordless rumble pad
{0x46d, 0xc283, hid_lgff_init}, // Logitech Wingman Force 3d
{0x46d, 0xc295, hid_lgff_init}, // Logitech MOMO force wheel
#endif
#ifdef CONFIG_HID_PID
{0x45e, 0x001b, hid_pid_init},
......
......@@ -40,13 +40,13 @@ static unsigned char hid_keyboard[256] = {
0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
27, 43, 84, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
27, 43, 43, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 87, 88, 99, 70,119,110,102,104,111,107,109,106,
105,108,103, 69, 98, 55, 74, 78, 96, 79, 80, 81, 75, 76, 77, 71,
72, 73, 82, 83, 86,127,116,117, 85, 89, 90, 91, 92, 93, 94, 95,
120,121,122,123,134,138,130,132,128,129,131,137,133,135,136,113,
115,114,unk,unk,unk,124,unk,181,182,183,184,185,186,187,188,189,
190,191,192,193,194,195,196,197,198,unk,unk,unk,unk,unk,unk,unk,
72, 73, 82, 83, 86,127,116,117,183,184,185,186,187,188,189,190,
191,192,193,194,134,138,130,132,128,129,131,137,133,135,136,113,
115,114,unk,unk,unk,121,unk, 89, 93,124, 92, 94, 95,unk,unk,unk,
122,123, 90, 91, 85,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,unk,
......
......@@ -6,7 +6,7 @@
* - WingMan Cordless RumblePad
* - WingMan Force 3D
*
* Copyright (c) 2002 Johann Deneux
* Copyright (c) 2002-2004 Johann Deneux
*/
/*
......@@ -25,13 +25,13 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Should you need to contact me, the author, you can do so by
* e-mail - mail your message to <deneux@ifrance.com>
* e-mail - mail your message to <johann.deneux@it.uu.se>
*/
#include <linux/input.h>
#include <linux/sched.h>
#define DEBUG
//#define DEBUG
#include <linux/usb.h>
#include <linux/circ_buf.h>
......@@ -179,8 +179,7 @@ int hid_lgff_init(struct hid_device* hid)
kfree(private);
return -1;
}
private->rumble->field[0]->value[0] = 0x03;
private->rumble->field[0]->value[1] = 0x42;
private->rumble->field[0]->value[0] = 0x42;
private->condition = hid_lgff_duplicate_report(report);
......@@ -207,7 +206,7 @@ int hid_lgff_init(struct hid_device* hid)
add_timer(&private->timer); /*TODO: only run the timer when at least
one effect is playing */
printk(KERN_INFO "Force feedback for Logitech force feedback devices by Johann Deneux <deneux@ifrance.com>\n");
printk(KERN_INFO "Force feedback for Logitech force feedback devices by Johann Deneux <johann.deneux@it.uu.se>\n");
return 0;
}
......@@ -254,7 +253,7 @@ static void hid_lgff_input_init(struct hid_device* hid)
signed short* ff;
u16 idVendor = hid->dev->descriptor.idVendor;
u16 idProduct = hid->dev->descriptor.idProduct;
struct hid_input *hidinput = list_entry(&hid->inputs, struct hid_input, list);
struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list);
while (dev->idVendor && (idVendor != dev->idVendor || idProduct != dev->idProduct))
dev++;
......@@ -511,10 +510,10 @@ static void hid_lgff_timer(unsigned long timer_data)
hid_submit_report(hid, lgff->constant, USB_DIR_OUT);
}
if (left != lgff->rumble->field[0]->value[3]
|| right != lgff->rumble->field[0]->value[4]) {
lgff->rumble->field[0]->value[3] = left;
lgff->rumble->field[0]->value[4] = right;
if (left != lgff->rumble->field[0]->value[2]
|| right != lgff->rumble->field[0]->value[3]) {
lgff->rumble->field[0]->value[2] = left;
lgff->rumble->field[0]->value[3] = right;
dbg("(left,right)=(%04x, %04x)", left, right);
hid_submit_report(hid, lgff->rumble, USB_DIR_OUT);
}
......
......@@ -49,13 +49,13 @@ static unsigned char usb_kbd_keycode[256] = {
0, 0, 0, 0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 21, 44, 2, 3,
4, 5, 6, 7, 8, 9, 10, 11, 28, 1, 14, 15, 57, 12, 13, 26,
27, 43, 84, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
27, 43, 43, 39, 40, 41, 51, 52, 53, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 87, 88, 99, 70,119,110,102,104,111,107,109,106,
105,108,103, 69, 98, 55, 74, 78, 96, 79, 80, 81, 75, 76, 77, 71,
72, 73, 82, 83, 86,127,116,117, 85, 89, 90, 91, 92, 93, 94, 95,
120,121,122,123,134,138,130,132,128,129,131,137,133,135,136,113,
115,114, 0, 0, 0,124, 0,181,182,183,184,185,186,187,188,189,
190,191,192,193,194,195,196,197,198, 0, 0, 0, 0, 0, 0, 0,
72, 73, 82, 83, 86,127,116,117,183,184,185,186,187,188,189,190,
191,192,193,194,134,138,130,132,128,129,131,137,133,135,136,113,
115,114, 0, 0, 0,121, 0, 89, 93,124, 92, 94, 95, 0, 0, 0,
122,123, 90, 91, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
......
......@@ -189,18 +189,18 @@ struct input_absinfo {
#define KEY_KP3 81
#define KEY_KP0 82
#define KEY_KPDOT 83
#define KEY_103RD 84
#define KEY_F13 85
#define KEY_ZENKAKUHANKAKU 85
#define KEY_102ND 86
#define KEY_F11 87
#define KEY_F12 88
#define KEY_F14 89
#define KEY_F15 90
#define KEY_F16 91
#define KEY_F17 92
#define KEY_F18 93
#define KEY_F19 94
#define KEY_F20 95
#define KEY_RO 89
#define KEY_KATAKANA 90
#define KEY_HIRAGANA 91
#define KEY_HENKAN 92
#define KEY_KATAKANAHIRAGANA 93
#define KEY_MUHENKAN 94
#define KEY_KPJPCOMMA 95
#define KEY_KPENTER 96
#define KEY_RIGHTCTRL 97
#define KEY_KPSLASH 98
......@@ -225,11 +225,11 @@ struct input_absinfo {
#define KEY_KPEQUAL 117
#define KEY_KPPLUSMINUS 118
#define KEY_PAUSE 119
#define KEY_F21 120
#define KEY_F22 121
#define KEY_F23 122
#define KEY_F24 123
#define KEY_KPCOMMA 124
#define KEY_KPCOMMA 121
#define KEY_HANGUEL 122
#define KEY_HANJA 123
#define KEY_YEN 124
#define KEY_LEFTMETA 125
#define KEY_RIGHTMETA 126
#define KEY_COMPOSE 127
......@@ -288,24 +288,18 @@ struct input_absinfo {
#define KEY_KPLEFTPAREN 179
#define KEY_KPRIGHTPAREN 180
#define KEY_INTL1 181
#define KEY_INTL2 182
#define KEY_INTL3 183
#define KEY_INTL4 184
#define KEY_INTL5 185
#define KEY_INTL6 186
#define KEY_INTL7 187
#define KEY_INTL8 188
#define KEY_INTL9 189
#define KEY_LANG1 190
#define KEY_LANG2 191
#define KEY_LANG3 192
#define KEY_LANG4 193
#define KEY_LANG5 194
#define KEY_LANG6 195
#define KEY_LANG7 196
#define KEY_LANG8 197
#define KEY_LANG9 198
#define KEY_F13 183
#define KEY_F14 184
#define KEY_F15 185
#define KEY_F16 186
#define KEY_F17 187
#define KEY_F18 188
#define KEY_F19 189
#define KEY_F20 190
#define KEY_F21 191
#define KEY_F22 192
#define KEY_F23 193
#define KEY_F24 194
#define KEY_PLAYCD 200
#define KEY_PAUSECD 201
......@@ -580,6 +574,7 @@ struct input_absinfo {
#define BUS_ISAPNP 0x02
#define BUS_USB 0x03
#define BUS_HIL 0x04
#define BUS_BLUETOOTH 0x05
#define BUS_ISA 0x10
#define BUS_I8042 0x11
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment