Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 2 Oct 2006 15:20:33 +0000 (08:20 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 2 Oct 2006 15:20:33 +0000 (08:20 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (35 commits)
  Input: wistron - add support for Acer TravelMate 2424NWXCi
  Input: wistron - fix setting up special buttons
  Input: add KEY_BLUETOOTH and KEY_WLAN definitions
  Input: add new BUS_VIRTUAL bus type
  Input: add driver for stowaway serial keyboards
  Input: make input_register_handler() return error codes
  Input: remove cruft that was needed for transition to sysfs
  Input: fix input module refcounting
  Input: constify input core
  Input: libps2 - rearrange exports
  Input: atkbd - support Microsoft Natural Elite Pro keyboards
  Input: i8042 - disable MUX mode on Toshiba Equium A110
  Input: i8042 - get rid of polling timer
  Input: send key up events at disconnect
  Input: constify psmouse driver
  Input: i8042 - add Amoi to the MUX blacklist
  Input: logips2pp - add sugnature 56 (Cordless MouseMan Wheel), cleanup
  Input: add driver for Touchwin serial touchscreens
  Input: add driver for Touchright serial touchscreens
  Input: add driver for Penmount serial touchscreens
  ...

1  2 
drivers/char/keyboard.c
drivers/input/keyboard/Kconfig
drivers/input/keyboard/Makefile
drivers/usb/input/Kconfig
drivers/usb/input/Makefile
drivers/usb/input/hid-core.c

diff --combined drivers/char/keyboard.c
index 99fb070fdbf875adb9a806406c0256cabaeb37ad,ca234ce8004ab040bf4f797cda3b9ae292c4ed7a..e2011669c7bb4bc187a3e216e21a37b1711b9f4e
@@@ -108,11 -108,7 +108,11 @@@ const int NR_TYPES = ARRAY_SIZE(max_val
  struct kbd_struct kbd_table[MAX_NR_CONSOLES];
  static struct kbd_struct *kbd = kbd_table;
  
 -int spawnpid, spawnsig;
 +struct vt_spawn_console vt_spawn_con = {
 +      .lock = SPIN_LOCK_UNLOCKED,
 +      .pid  = NULL,
 +      .sig  = 0,
 +};
  
  /*
   * Variables exported for vt.c
@@@ -582,13 -578,9 +582,13 @@@ static void fn_compose(struct vc_data *
  
  static void fn_spawn_con(struct vc_data *vc, struct pt_regs *regs)
  {
 -      if (spawnpid)
 -              if (kill_proc(spawnpid, spawnsig, 1))
 -                      spawnpid = 0;
 +      spin_lock(&vt_spawn_con.lock);
 +      if (vt_spawn_con.pid)
 +              if (kill_pid(vt_spawn_con.pid, vt_spawn_con.sig, 1)) {
 +                      put_pid(vt_spawn_con.pid);
 +                      vt_spawn_con.pid = NULL;
 +              }
 +      spin_unlock(&vt_spawn_con.lock);
  }
  
  static void fn_SAK(struct vc_data *vc, struct pt_regs *regs)
@@@ -1293,7 -1285,7 +1293,7 @@@ static void kbd_event(struct input_hand
   */
  static struct input_handle *kbd_connect(struct input_handler *handler,
                                        struct input_dev *dev,
-                                       struct input_device_id *id)
+                                       const struct input_device_id *id)
  {
        struct input_handle *handle;
        int i;
@@@ -1342,7 -1334,7 +1342,7 @@@ static void kbd_start(struct input_hand
        tasklet_enable(&keyboard_tasklet);
  }
  
- static struct input_device_id kbd_ids[] = {
+ static const struct input_device_id kbd_ids[] = {
        {
                  .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
                  .evbit = { BIT(EV_KEY) },
@@@ -1370,6 -1362,7 +1370,7 @@@ static struct input_handler kbd_handle
  int __init kbd_init(void)
  {
        int i;
+       int error;
  
          for (i = 0; i < MAX_NR_CONSOLES; i++) {
                kbd_table[i].ledflagstate = KBD_DEFLEDS;
                kbd_table[i].kbdmode = VC_XLATE;
        }
  
-       input_register_handler(&kbd_handler);
+       error = input_register_handler(&kbd_handler);
+       if (error)
+               return error;
  
        tasklet_enable(&keyboard_tasklet);
        tasklet_schedule(&keyboard_tasklet);
index 83eac3a66bc801d11f11d6f1535f3894b9950f18,ebd98d18cf0b4abcf20a32d4ff6a63db223e0ab7..c62e00c79dec81a80135b6a9702dd65e3d0e987a
@@@ -121,6 -121,17 +121,17 @@@ config KEYBOARD_NEWTO
          To compile this driver as a module, choose M here: the
          module will be called newtonkbd.
  
+ config KEYBOARD_STOWAWAY
+       tristate "Stowaway keyboard"
+       select SERIO
+       help
+         Say Y here if you have a Stowaway keyboard on a serial port.
+         Stowaway compatible keyboards like Dicota Input-PDA keyboard
+         are also supported by this driver.
+         To compile this driver as a module, choose M here: the
+         module will be called stowaway.
  config KEYBOARD_CORGI
        tristate "Corgi keyboard"
        depends on PXA_SHARPSL
@@@ -183,13 -194,4 +194,13 @@@ config KEYBOARD_HI
          This driver implements support for HIL-keyboards attached
          to your machine, so normally you should say Y here.
  
 +config KEYBOARD_OMAP
 +      tristate "TI OMAP keypad support"
 +      depends on (ARCH_OMAP1 || ARCH_OMAP2)
 +      help
 +        Say Y here if you want to use the OMAP keypad.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called omap-keypad.
 +
  endif
index b265391f1f10a226e6054d3496cb296f3deeafc7,bb4525e59df7894ee0cf950b53064e123b4c835f..4c79e7bc9d06df25bfd98a71a1acd480ab98201e
@@@ -11,9 -11,9 +11,10 @@@ obj-$(CONFIG_KEYBOARD_XTKBD)         += xtkbd.
  obj-$(CONFIG_KEYBOARD_AMIGA)          += amikbd.o
  obj-$(CONFIG_KEYBOARD_LOCOMO)         += locomokbd.o
  obj-$(CONFIG_KEYBOARD_NEWTON)         += newtonkbd.o
+ obj-$(CONFIG_KEYBOARD_STOWAWAY)               += stowaway.o
  obj-$(CONFIG_KEYBOARD_CORGI)          += corgikbd.o
  obj-$(CONFIG_KEYBOARD_SPITZ)          += spitzkbd.o
  obj-$(CONFIG_KEYBOARD_HIL)            += hil_kbd.o
  obj-$(CONFIG_KEYBOARD_HIL_OLD)                += hilkbd.o
 +obj-$(CONFIG_KEYBOARD_OMAP)             += omap-keypad.o
  
index a102a58fe3612c89589817dadcdd9b6c566d5cf4,7ec35c90d2d739bbe381b06c47997bc85712a908..21cd22640080fbce6d032354409f59dc61de32a3
@@@ -60,16 -60,17 +60,17 @@@ config HID_F
          If unsure, say N.
  
  config HID_PID
-       bool "PID Devices (Microsoft Sidewinder Force Feedback 2)"
+       bool "PID device support"
        depends on HID_FF
        help
-         Say Y here if you have a PID-compliant joystick and wish to enable force
-         feedback for it. The Microsoft Sidewinder Force Feedback 2 is one such
-         device.
+         Say Y here if you have a PID-compliant device and wish to enable force
+         feedback for it. Microsoft Sidewinder Force Feedback 2 is one of such
+         devices.
  
  config LOGITECH_FF
        bool "Logitech WingMan *3D support"
        depends on HID_FF
+       select INPUT_FF_MEMLESS if USB_HID
        help
          Say Y here if you have one of these devices:
          - Logitech WingMan Cordless RumblePad
  config THRUSTMASTER_FF
        bool "ThrustMaster FireStorm Dual Power 2 support (EXPERIMENTAL)"
        depends on HID_FF && EXPERIMENTAL
+       select INPUT_FF_MEMLESS if USB_HID
        help
          Say Y here if you have a THRUSTMASTER FireStore Dual Power 2,
          and want to enable force feedback support for it.
          Note: if you say N here, this device will still be supported, but without
          force feedback.
  
+ config ZEROPLUS_FF
+       bool "Zeroplus based game controller support"
+       depends on HID_FF
+       select INPUT_FF_MEMLESS if USB_HID
+       help
+         Say Y here if you have a Zeroplus based game controller and want to
+         enable force feedback for it.
  config USB_HIDDEV
        bool "/dev/hiddev raw HID device support"
        depends on USB_HID
@@@ -205,12 -215,10 +215,12 @@@ config USB_TOUCHSCREE
        depends on USB && INPUT
        ---help---
          USB Touchscreen driver for:
 -        - eGalax Touchkit USB
 +        - eGalax Touchkit USB (also includes eTurboTouch CT-410/510/700)
          - PanJit TouchSet USB
 -        - 3M MicroTouch USB
 +        - 3M MicroTouch USB (EX II series)
          - ITM
 +        - some other eTurboTouch
 +        - Gunze AHL61
  
          Have a look at <http://linux.chapter7.ch/touchkit/> for
          a usage description and the required user-space stuff.
  
  config USB_TOUCHSCREEN_EGALAX
        default y
 -      bool "eGalax device support" if EMBEDDED
 +      bool "eGalax, eTurboTouch CT-410/510/700 device support" if EMBEDDED
        depends on USB_TOUCHSCREEN
  
  config USB_TOUCHSCREEN_PANJIT
  
  config USB_TOUCHSCREEN_3M
        default y
 -      bool "3M/Microtouch device support" if EMBEDDED
 +      bool "3M/Microtouch EX II series device support" if EMBEDDED
        depends on USB_TOUCHSCREEN
  
  config USB_TOUCHSCREEN_ITM
        bool "ITM device support" if EMBEDDED
        depends on USB_TOUCHSCREEN
  
 +config USB_TOUCHSCREEN_ETURBO
 +      default y
 +      bool "eTurboTouch (non-eGalax compatible) device support" if EMBEDDED
 +      depends on USB_TOUCHSCREEN
 +
 +config USB_TOUCHSCREEN_GUNZE
 +      default y
 +      bool "Gunze AHL61 device support" if EMBEDDED
 +      depends on USB_TOUCHSCREEN
 +
  config USB_YEALINK
        tristate "Yealink usb-p1k voip phone"
        depends on USB && INPUT && EXPERIMENTAL
@@@ -338,13 -336,3 +348,13 @@@ config USB_APPLETOUC
  
          To compile this driver as a module, choose M here: the
          module will be called appletouch.
 +
 +config USB_TRANCEVIBRATOR
 +      tristate "PlayStation 2 Trance Vibrator driver support"
 +      depends on USB
 +      help
 +        Say Y here if you want to connect a PlayStation 2 Trance Vibrator
 +        device to your computer's USB port.
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called trancevibrator.
index 48551be324ac61fb102a530fcd34ad0205fbed57,affb6a36d242eb4331d6c5fbe29f35f7a7e85c8c..295f459d1079ffa4c3afe69bb38d61474f503162
@@@ -3,7 -3,6 +3,7 @@@
  #
  
  # Multipart objects.
 +wacom-objs    := wacom_sys.o wacom_wac.o
  usbhid-objs   := hid-core.o
  
  # Optional parts of multipart objects.
@@@ -15,7 -14,7 +15,7 @@@ ifeq ($(CONFIG_USB_HIDINPUT),y
        usbhid-objs     += hid-input.o
  endif
  ifeq ($(CONFIG_HID_PID),y)
-       usbhid-objs     += pid.o
+       usbhid-objs     += hid-pidff.o
  endif
  ifeq ($(CONFIG_LOGITECH_FF),y)
        usbhid-objs     += hid-lgff.o
@@@ -23,6 -22,9 +23,9 @@@ endi
  ifeq ($(CONFIG_THRUSTMASTER_FF),y)
        usbhid-objs     += hid-tmff.o
  endif
+ ifeq ($(CONFIG_ZEROPLUS_FF),y)
+       usbhid-objs     += hid-zpff.o
+ endif
  ifeq ($(CONFIG_HID_FF),y)
        usbhid-objs     += hid-ff.o
  endif
@@@ -45,7 -47,6 +48,7 @@@ obj-$(CONFIG_USB_ACECAD)      += acecad.
  obj-$(CONFIG_USB_YEALINK)     += yealink.o
  obj-$(CONFIG_USB_XPAD)                += xpad.o
  obj-$(CONFIG_USB_APPLETOUCH)  += appletouch.o
 +obj-$(CONFIG_USB_TRANCEVIBRATOR)      += trancevibrator.o
  
  ifeq ($(CONFIG_USB_DEBUG),y)
  EXTRA_CFLAGS += -DDEBUG
index 81b1ea01a172e40e32790a64d6602f653b0e9171,bfa267722f1bef96be8e780b5c0a4ae82bb35d98..e0fd11605b430939fc10dbfc52111f9de3745d92
@@@ -543,8 -543,6 +543,6 @@@ static void hid_free_device(struct hid_
  {
        unsigned i,j;
  
-       hid_ff_exit(device);
        for (i = 0; i < HID_REPORT_TYPES; i++) {
                struct hid_report_enum *report_enum = device->report_enum + i;
  
@@@ -1023,8 -1021,7 +1021,8 @@@ static void hid_irq_in(struct urb *urb
                        return;
                case -EILSEQ:           /* protocol error or unplug */
                case -EPROTO:           /* protocol error or unplug */
 -              case -ETIMEDOUT:        /* NAK */
 +              case -ETIME:            /* protocol error or unplug */
 +              case -ETIMEDOUT:        /* Should never happen, but... */
                        clear_bit(HID_IN_RUNNING, &hid->iofl);
                        hid_io_error(hid);
                        return;
@@@ -1109,7 -1106,7 +1107,7 @@@ int hid_set_field(struct hid_field *fie
  /*
   * Find a report field with a specified HID usage.
   */
+ #if 0
  struct hid_field *hid_find_field_by_usage(struct hid_device *hid, __u32 wanted_usage, int type)
  {
        struct hid_report *report;
                                return report->field[i];
        return NULL;
  }
+ #endif  /*  0  */
  
  static int hid_submit_out(struct hid_device *hid)
  {
@@@ -1536,17 -1534,13 +1535,17 @@@ void hid_init_reports(struct hid_devic
  #define USB_VENDOR_ID_GLAB            0x06c2
  #define USB_DEVICE_ID_4_PHIDGETSERVO_30       0x0038
  #define USB_DEVICE_ID_1_PHIDGETSERVO_30       0x0039
 -#define USB_DEVICE_ID_8_8_8_IF_KIT    0x0045
  #define USB_DEVICE_ID_0_0_4_IF_KIT    0x0040
 +#define USB_DEVICE_ID_0_16_16_IF_KIT  0x0044
 +#define USB_DEVICE_ID_8_8_8_IF_KIT    0x0045
 +#define USB_DEVICE_ID_0_8_7_IF_KIT    0x0051
  #define USB_DEVICE_ID_0_8_8_IF_KIT    0x0053
 +#define USB_DEVICE_ID_PHIDGET_MOTORCONTROL    0x0058
  
  #define USB_VENDOR_ID_WISEGROUP               0x0925
  #define USB_DEVICE_ID_1_PHIDGETSERVO_20       0x8101
  #define USB_DEVICE_ID_4_PHIDGETSERVO_20       0x8104
 +#define USB_DEVICE_ID_8_8_4_IF_KIT    0x8201
  #define USB_DEVICE_ID_DUAL_USB_JOYPAD   0x8866
  
  #define USB_VENDOR_ID_WISEGROUP_LTD   0x6677
  
  #define USB_VENDOR_ID_YEALINK         0x6993
  #define USB_DEVICE_ID_YEALINK_P1K_P4K_B2K     0xb001
 +
 +#define USB_VENDOR_ID_ALCOR           0x058f
 +#define USB_DEVICE_ID_ALCOR_USBRS232  0x9720
 +
 +#define USB_VENDOR_ID_SUN             0x0430
 +#define USB_DEVICE_ID_RARITAN_KVM_DONGLE      0xcdab
 +
  /*
   * Alphabetically sorted blacklist by quirk type.
   */
@@@ -1620,7 -1607,6 +1619,7 @@@ static const struct hid_blacklist 
        { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_22, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_23, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_24, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_ALCOR, USB_DEVICE_ID_ALCOR_USBRS232, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW40, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_CODEMERCS, USB_DEVICE_ID_CODEMERCS_IOW24, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE },
 -      { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_0_4_IF_KIT, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_16_16_IF_KIT, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_7_IF_KIT, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_PHIDGET_MOTORCONTROL, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 20, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 30, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 100, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 108, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 118, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 200, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 300, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ONTRAK, USB_DEVICE_ID_ONTRAK_ADU100 + 400, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
 +      { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_8_8_4_IF_KIT, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE },
  
        { USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_ACECAD_FLAIR, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
 +      { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
        { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
  
@@@ -1840,7 -1817,7 +1839,7 @@@ static struct hid_device *usb_hid_confi
        int n, len, insize = 0;
  
          /* Ignore all Wacom devices */
 -        if (dev->descriptor.idVendor == USB_VENDOR_ID_WACOM)
 +        if (le16_to_cpu(dev->descriptor.idVendor) == USB_VENDOR_ID_WACOM)
                  return NULL;
  
        for (n = 0; hid_blacklist[n].idVendor; n++)