Skip to contentSkip to conversation

Update of the input subsystem - 37 csets

PATCH In review Vojtech Pavlik 2 participants 4 messages Feb 6, 2003 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Update of the input subsystem - 37 csets

Hi!

Quite a lot of input patches have accumulated in my tree, I'm sending them to you now.

You can pull the csets from:
bk://kernel.bkbits.net/vojtech/input

For those who want to see a plain patch:

	http://atrey.karlin.mff.cuni.cz/~vojtech/input-2.5.59.diff

The most important changes include atkbd fixes for some notebooks and non-PC archs, and passing of pt_regs all the way to keyboard.c so that magic-sysrq works properly with all kinds of keyboards and multiple keyboard setups.

Diffstat:

 arch/sparc64/kernel/irq.c                      |    3 
 drivers/acorn/char/keyb_arc.c                  |    1 
 drivers/char/ec3104_keyb.c                     |    2 
 drivers/char/keyboard.c                        |  148 ++++----
 drivers/char/misc.c                            |    3 
 drivers/input/gameport/ns558.c                 |    8 
 drivers/input/joydev.c                         |    9 
 drivers/input/joystick/amijoy.c                |    2 
 drivers/input/joystick/iforce/iforce-packets.c |    5 
 drivers/input/joystick/iforce/iforce-serio.c   |    4 
 drivers/input/joystick/iforce/iforce-usb.c     |   15 
 drivers/input/joystick/iforce/iforce.h         |    2 
 drivers/input/joystick/magellan.c              |    8 
 drivers/input/joystick/spaceball.c             |    8 
 drivers/input/joystick/spaceorb.c              |    8 
 drivers/input/joystick/stinger.c               |    8 
 drivers/input/joystick/twidjoy.c               |    8 
 drivers/input/joystick/warrior.c               |   10 
 drivers/input/keyboard/amikbd.c                |    2 
 drivers/input/keyboard/atkbd.c                 |   59 +--
 drivers/input/keyboard/newtonkbd.c             |    8 
 drivers/input/keyboard/sunkbd.c                |    5 
 drivers/input/keyboard/xtkbd.c                 |    3 
 drivers/input/misc/98spkr.c                    |   95 +++++
 drivers/input/misc/Kconfig                     |    4 
 drivers/input/misc/Makefile                    |    1 
 drivers/input/misc/gsc_ps2.c                   |   13 
 drivers/input/mouse/amimouse.c                 |    2 
 drivers/input/mouse/inport.c                   |    2 
 drivers/input/mouse/logibm.c                   |    1 
 drivers/input/mouse/pc110pad.c                 |    1 
 drivers/input/mouse/psmouse.c                  |   44 +-
 drivers/input/mouse/rpcmouse.c                 |    2 
 drivers/input/mouse/sermouse.c                 |   14 
 drivers/input/serio/ambakmi.c                  |    6 
 drivers/input/serio/ct82c710.c                 |    2 
 drivers/input/serio/i8042.c                    |   16 
 drivers/input/serio/parkbd.c                   |    2 
 drivers/input/serio/q40kbd.c                   |    3 
 drivers/input/serio/rpckbd.c                   |    5 
 drivers/input/serio/sa1111ps2.c                |    6 
 drivers/input/serio/serio.c                    |    4 
 drivers/input/serio/serport.c                  |    5 
 drivers/input/touchscreen/gunze.c              |    7 
 drivers/input/touchscreen/h3600_ts_input.c     |    6 
 drivers/macintosh/adbhid.c                     |   22 -
 drivers/serial/sunsu.c                         |    4 
 drivers/serial/sunzilog.c                      |    4 
 drivers/usb/input/Kconfig                      |   12 
 drivers/usb/input/Makefile                     |    3 
 drivers/usb/input/aiptek.c                     |   31 +
 drivers/usb/input/fixp-arith.h                 |   12 
 drivers/usb/input/hid-core.c                   |   28 -
 drivers/usb/input/hid-ff.c                     |    4 
 drivers/usb/input/hid-input.c                  |   13 
 drivers/usb/input/hid-tmff.c                   |  461 +++++++++++++++++++++++++
 drivers/usb/input/hid.h                        |    6 
 drivers/usb/input/hiddev.c                     |    2 
 drivers/usb/input/powermate.c                  |   25 -
 drivers/usb/input/usbkbd.c                     |    2 
 drivers/usb/input/usbmouse.c                   |    1 
 drivers/usb/input/wacom.c                      |   21 +
 drivers/usb/input/xpad.c                       |    6 
 include/asm-sparc/system.h                     |    2 
 include/asm-sparc64/system.h                   |    2 
 include/linux/hiddev.h                         |    4 
 include/linux/input.h                          |    5 
 include/linux/kbd_kern.h                       |    5 
 include/linux/keyboard.h                       |    1 
 include/linux/pc_keyb.h                        |  130 -------
 include/linux/serio.h                          |   13 
 71 files changed, 981 insertions(+), 408 deletions(-)

Changes:

[email protected], 2003-02-06 12:00:30+01:00, [email protected]
Automatic & manual BK merge

[email protected], 2003-02-05 20:51:14+01:00, [email protected]
input: serio.h - allocate an serio ID for SemTech touchscreen.

[email protected], 2003-02-03 00:08:52+01:00, [email protected]
input: Enable AT keyboard emulation on PA-RISC.

[email protected], 2003-01-30 10:15:29+01:00, [email protected]
input: sunkbd.c - fix reading beyond end of keycode array.

[email protected], 2003-01-29 20:38:58+01:00, [email protected]
input: psmouse.c - Fix and disable PS2++ debug message.

[email protected], 2003-01-29 10:15:16+01:00, [email protected]
input: psmouse.c: Fix PS2++ packet numbers.

[email protected], 2003-01-27 17:34:52+01:00, [email protected]
input: atkbd.c - Now that atkbd_command() handles RESET_BAT gracefully, we can reset the keyboard on reboot instead of setting old scancode set. This should help some notebooks which crash after Linux reboots.

[email protected], 2003-01-27 17:33:40+01:00, [email protected]
input: psmouse.c - Proper detection of PS2++ packets, take II

[email protected], 2003-01-26 22:11:45+01:00, [email protected]
input: psmouse.c - Fix Logitech PS2++ extended packet detection.

[email protected], 2003-01-26 16:05:33+01:00, [email protected]
input: tmff.c: Protect tmff_exit by grabbing a spinlock.

[email protected], 2003-01-26 15:49:21+01:00, [email protected]
input: serio.h - add SNES-232 serio type.

[email protected], 2003-01-26 15:21:48+01:00, [email protected]
input: Resurrect usb_set_report for Aiptek and Wacom tablets.

[email protected], 2003-01-26 13:52:29+01:00, [email protected]
input: tmff.c - Fix handling the case where the effect is re-uploaded to change strength of the effect.

[email protected], 2003-01-26 13:51:24+01:00, [email protected]
input: hid: use fuzz/flat filtering only for joysticks and gamepads.

[email protected], 2003-01-26 12:56:09+01:00, [email protected]
input: powermate.c: This works around an undocumented firmware bug in the Griffin PowerMate knob and fixes the handling of LED brightness.

[email protected], 2003-01-26 11:06:08+01:00, [email protected]
input: Don't require keys/buttons at all for joysticks. There are many weird devices that don't have them.

[email protected], 2003-01-25 22:44:45+01:00, [email protected]
input: Add support for ThrustMaster USB Force Feedback devices.

[email protected], 2003-01-25 18:07:05+01:00, [email protected]
input: Give preferential treatment to gameport at 0x201, and use the odd addresses for access.

[email protected], 2003-01-25 18:01:14+01:00, [email protected]
Input: Allow throttles without keys.

[email protected], 2003-01-25 17:39:00+01:00, [email protected]
input: Fix a typo the hid.h quirk definitions.

[email protected], 2003-01-25 17:26:02+01:00, [email protected]
Add USB hid blacklist driver entries for OnTrak data acquistion boards and a TangTop PS/2->USB converter.

[email protected], 2003-01-25 15:40:41+01:00, [email protected]
Final step of getting rid of kbd_pt_regs - pass the regs as arguments to handler_fn functions in keyboard.c

[email protected], 2003-01-25 14:34:17+01:00, [email protected]
Amiga keyboard: the release bit indicates a key release, not a key press.

[email protected], 2003-01-25 14:33:15+01:00, [email protected]
Q40/Q60 keyboard fixes:
- IRQ definitions were prepended with Q40_
- <asm/keyboard.h> no longer exists
- Let q40kbd_init() fails if not running on a Q40/Q60
- q40kbd_init() must return an error code
- Make q40kbd_{init,exit}() static

[email protected], 2003-01-23 08:25:40+01:00, [email protected]
hid-core.c: Add a missing error path on a possible urb allocation failure.

[email protected], 2003-01-21 17:21:50+01:00, [email protected]
Support for NEC PC-9800 beeper and support for Kana Lock LED.

[email protected], 2003-01-12 17:10:47+01:00, [email protected]
input: atkbd.c and psmouse.c had a race when reading the ID of the attached keyboard/mouse that could cause the device not to be found if it replied too fast. Fixed.

[email protected], 2003-01-12 14:05:52+01:00, [email protected]
Get rid of kbd_pt_regs.

[email protected], 2003-01-12 13:34:36+01:00, [email protected]
Pass pt_regs from interrupts (usb, serio, others) all the way to keyboard.c so that it can display them properly in SysRq.

[email protected], 2003-01-12 11:24:26+01:00, [email protected]
Merge suse.cz:/home/vojtech/bk/linus into suse.cz:/home/vojtech/bk/input

[email protected], 2003-01-11 23:01:56+01:00, [email protected]
atkbd->ack and psmouse->ack need to be volatile.

[email protected], 2003-01-08 09:46:41+01:00, [email protected]
Let newly connected keyboards pickup the LED state.

[email protected], 2002-12-27 11:56:18+01:00, [email protected]
keyboard.c: Only print warnings when unable to generate rawmode when the event is a real key, not a button or whatever else.

[email protected], 2002-12-10 12:45:54-08:00, jsimmons@kozmo.(none)
Delete: include/linux/pc_keyb.h

[email protected], 2002-12-10 12:07:45-08:00, jsimmons@kozmo.(none)
The VT tty layer depends on the input api now. Fixed this dependency.

[email protected], 2002-12-10 11:44:59-08:00, jsimmons@kozmo.(none)
Old PS/2 code removal.

[email protected], 2002-11-17 00:57:44+01:00, [email protected]
Avoid possible endless loop sending resend commands in atkbd.c with very stupid devices (like CCD-80SX barcode scanner, which doesn't trigger the problem only because of luck).

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#1 lore raw

* Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
* This seems a good reason to start with NumLock off.
*/
+#ifndef CONFIG_X86_PC9800
#define KBD_DEFLEDS 0
+#else
+#define KBD_DEFLEDS (1 << VC_NUMLOCK)
+#endif
#endif

This ifdef is the wrong way around.
But having something like

#ifndef KBD_DEFLEDS
#define KBD_DEFLEDS 0
#endif

and the PC98-specific stuff in a asm header sounds like a much better plan.

include/linux/serio.h +3 -1
@@ -10,10 +10,13 @@
  */
 
 #include <linux/ioctl.h>
-#include <linux/list.h>
 
 #define SPIOCSTYPE	_IOW('q', 0x01, unsigned long)
 
+#ifdef __KERNEL__
+
+#include <linux/list.h>
 
 

Don't add more #ifdef __KERNEL__ - the kernel headers aren't supposed to be included from userspace.

#2 lore raw
Quoted 11 lines · Christoph Hellwig

* Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
* This seems a good reason to start with NumLock off.
*/

(quoted diff) +4 -0
+#ifndef CONFIG_X86_PC9800
 #define KBD_DEFLEDS 0
+#else
+#define KBD_DEFLEDS (1 << VC_NUMLOCK)
+#endif
 #endif

This ifdef is the wrong way around.

The ifdef is the right way around. KBD_DEFLEDS used to be 0. Now KBD_DEFLEDS is also 0, except when CONFIG_X86_PC9800 is defined. Note it's an if*n*def there.

Quoted 7 lines

But having something like

#ifndef KBD_DEFLEDS
#define KBD_DEFLEDS 0
#endif

and the PC98-specific stuff in a asm header sounds like a much better plan.

Yes. Send me a patch that does this, and I'll happily merge it in.

Quoted 15 lines
include/linux/serio.h +3 -1
@@ -10,10 +10,13 @@
  */
 
 #include <linux/ioctl.h>
-#include <linux/list.h>
 
 #define SPIOCSTYPE	_IOW('q', 0x01, unsigned long)
 
+#ifdef __KERNEL__
+
+#include <linux/list.h>
 
 
Quoted 2 lines

Don't add more #ifdef __KERNEL__ - the kernel headers aren't supposed to be included from userspace.

Hmm. I know this isn't the prefered way of doing it, but so far it's the most convenient one - serio.h still changes now and then (adding new #defines, etc), and the only one program using it is inputattach.c. To me it seems quite sane to have inputattach.c include this kernel header. If you know of any other reasonably maintainable way to do it ...

Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#3 lore raw
Quoted 12 lines · Vojtech Pavlik
Quoted 10 lines · Christoph Hellwig

* Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
* This seems a good reason to start with NumLock off.
*/

(quoted diff) +4 -0
+#ifndef CONFIG_X86_PC9800
 #define KBD_DEFLEDS 0
+#else
+#define KBD_DEFLEDS (1 << VC_NUMLOCK)
+#endif
 #endif
Quoted 5 lines
Quoted 1 line

This ifdef is the wrong way around.

The ifdef is the right way around. KBD_DEFLEDS used to be 0. Now KBD_DEFLEDS is also 0, except when CONFIG_X86_PC9800 is defined. Note it's an if*n*def there.

yes, that's what I meant :) Don't use ifndef nless nessecary. Sorry for the unclear wording.

Quoted 5 lines

Hmm. I know this isn't the prefered way of doing it, but so far it's the most convenient one - serio.h still changes now and then (adding new #defines, etc), and the only one program using it is inputattach.c. To me it seems quite sane to have inputattach.c include this kernel header. If you know of any other reasonably maintainable way to do it ...

split serio.h into serio_ids.h (the ids used by inputattach.c) and serio.h (the actual kernel header). Copy over serio_ids.h to the inputattach source tarball and resync it whenever nessecary.