Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jul 2013 22:35:08 +0000 (15:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jul 2013 22:35:08 +0000 (15:35 -0700)
Pull input updates from Dmitry Torokhov:
 "First round of updates for the input subsystem.

  You will get a new touchsreen driver for Cypress 4th generation
  devices, a driver for a special controller implementing PS/2 protocol
  in OLPC devices, and a driver for power key for SiRFprimaII PWRC.

  HID and bcm5497 now support for the 2013 MacBook Air.

  EVIOCGKEY and the rest of evdev ioctls now flush events of matching
  type from the client's event queue so that clients can be sure any
  events received after issuing EVIOCG* ioctl are new events.

  And a host of cleanups and improvements in other drivers"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (87 commits)
  Input: cyttsp4 - kfree xfer_buf on error path in probe()
  Input: tps6507x-ts - select INPUT_POLLDEV
  Input: bcm5974 - add support for the 2013 MacBook Air
  HID: apple: Add support for the 2013 Macbook Air
  Input: cyttsp4 - leak on error path in probe()
  Input: cyttsp4 - silence NULL dereference warning
  Input: cyttsp4 - silence shift wrap warning
  Input: tps6507x-ts - convert to polled input device infrastructure
  ARM: davinci: da850-evm: remove vref from touchscreen platform data
  Input: cyttsp4 - SPI driver for Cypress TMA4XX touchscreen devices
  Input: cyttsp4 - I2C driver for Cypress TMA4XX touchscreen devices
  Input: cyttsp4 - add core driver for Cypress TMA4XX touchscreen devices
  Input: cyttsp - I2C driver split into two modules
  Input: add OLPC AP-SP driver
  Input: nspire-keypad - remove redundant dev_err call in nspire_keypad_probe()
  Input: tps6507x-ts - remove vref from platform data
  Input: tps6507x-ts - use bool for booleans
  Input: tps6507x-ts - remove bogus unreachable code
  Input: samsung-keypad - let device core setup the default pin configuration
  Input: wacom_i2c - implement hovering capability
  ...

1  2 
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/tty/sysrq.c

diff --combined drivers/hid/hid-core.c
@@@ -1293,7 -1293,7 +1293,7 @@@ int hid_input_report(struct hid_device 
  
        if (hdrv && hdrv->raw_event && hid_match_report(hid, report)) {
                ret = hdrv->raw_event(hid, report, data, size);
 -              if (ret != 0) {
 +              if (ret < 0) {
                        ret = ret < 0 ? ret : 0;
                        goto unlock;
                }
@@@ -1547,6 -1547,9 +1547,9 @@@ static const struct hid_device_id hid_h
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0030) },
        { HID_USB_DEVICE(USB_VENDOR_ID_EMS, USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II) },
        { HID_USB_DEVICE(USB_VENDOR_ID_EZKEY, USB_DEVICE_ID_BTC_8193) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GAMERON, USB_DEVICE_ID_GAMERON_DUAL_PSX_ADAPTOR) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
        { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
        { HID_USB_DEVICE(USB_VENDOR_ID_JESS2, USB_DEVICE_ID_JESS2_COLOR_RUMBLE_PAD) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ION, USB_DEVICE_ID_ICADE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_I405X) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
@@@ -2050,8 -2045,6 +2053,8 @@@ static const struct hid_device_id hid_i
        { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1007) },
        { HID_USB_DEVICE(USB_VENDOR_ID_IMATION, USB_DEVICE_ID_DISC_STAKKA) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_410) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_JABRA, USB_DEVICE_ID_JABRA_SPEAK_510) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KWORLD, USB_DEVICE_ID_KWORLD_RADIO_FM700) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_GPEN_560) },
@@@ -2189,6 -2182,9 +2192,9 @@@ static const struct hid_device_id hid_m
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ANSI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_ISO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING7A_JIS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_ISO) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING8_JIS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
        { }
diff --combined drivers/hid/hid-ids.h
  #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS   0x023b
  #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ANSI  0x0255
  #define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO   0x0256
+ #define USB_DEVICE_ID_APPLE_WELLSPRING8_ANSI  0x0291
+ #define USB_DEVICE_ID_APPLE_WELLSPRING8_ISO   0x0292
+ #define USB_DEVICE_ID_APPLE_WELLSPRING8_JIS   0x0293
  #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY  0x030a
  #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY   0x030b
  #define USB_DEVICE_ID_APPLE_IRCONTROL 0x8240
  #define USB_DEVICE_ID_CYPRESS_BARCODE_4       0xed81
  #define USB_DEVICE_ID_CYPRESS_TRUETOUCH       0xc001
  
 +#define USB_VENDOR_ID_DATA_MODUL      0x7374
 +#define USB_VENDOR_ID_DATA_MODUL_EASYMAXTOUCH 0x1201
 +
  #define USB_VENDOR_ID_DEALEXTREAME    0x10c5
  #define USB_DEVICE_ID_DEALEXTREAME_RADIO_SI4701       0x819a
  
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_725E     0x725e
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7262     0x7262
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_726B     0x726b
 -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72AA     0x72aa
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72A1     0x72a1
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72AA     0x72aa
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4     0x72c4
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72D0     0x72d0
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA     0x72fa
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302     0x7302
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349     0x7349
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7     0x73f7
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001     0xa001
 -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7224      0x7224
 -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72D0      0x72d0
 -#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4      0x72c4
  
  #define USB_VENDOR_ID_ELECOM          0x056e
  #define USB_DEVICE_ID_ELECOM_BM084    0x0061
  #define USB_DEVICE_ID_UGCI_FLYING     0x0020
  #define USB_DEVICE_ID_UGCI_FIGHTING   0x0030
  
 +#define USB_VENDOR_ID_HUION           0x256c
 +#define USB_DEVICE_ID_HUION_580               0x006e
 +
  #define USB_VENDOR_ID_IDEACOM         0x1cb6
  #define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650
  #define USB_DEVICE_ID_IDEACOM_IDC6651 0x6651
  
  #define USB_VENDOR_ID_HOLTEK_ALT              0x04d9
  #define USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD     0xa055
 +#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A067   0xa067
 +#define USB_DEVICE_ID_HOLTEK_ALT_MOUSE_A04A   0xa04a
  
  #define USB_VENDOR_ID_IMATION         0x0718
  #define USB_DEVICE_ID_DISC_STAKKA     0xd000
  #define USB_VENDOR_ID_IRTOUCHSYSTEMS  0x6615
  #define USB_DEVICE_ID_IRTOUCH_INFRARED_USB    0x0070
  
 +#define USB_VENDOR_ID_JABRA           0x0b0e
 +#define USB_DEVICE_ID_JABRA_SPEAK_410 0x0412
 +#define USB_DEVICE_ID_JABRA_SPEAK_510 0x0420
 +
  #define USB_VENDOR_ID_JESS            0x0c45
  #define USB_DEVICE_ID_JESS_YUREX      0x1010
  
  
  #define USB_VENDOR_ID_KYE             0x0458
  #define USB_DEVICE_ID_KYE_ERGO_525V   0x0087
 +#define USB_DEVICE_ID_GENIUS_GILA_GAMING_MOUSE        0x0138
  #define USB_DEVICE_ID_KYE_GPEN_560    0x5003
  #define USB_DEVICE_ID_KYE_EASYPEN_I405X       0x5010
  #define USB_DEVICE_ID_KYE_MOUSEPEN_I608X      0x5011
  #define USB_DEVICE_ID_SONY_PS3_BDREMOTE               0x0306
  #define USB_DEVICE_ID_SONY_PS3_CONTROLLER     0x0268
  #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER      0x042f
 +#define USB_DEVICE_ID_SONY_BUZZ_CONTROLLER            0x0002
 +#define USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER   0x1000
  
  #define USB_VENDOR_ID_SOUNDGRAPH      0x15c2
  #define USB_DEVICE_ID_SOUNDGRAPH_IMON_FIRST   0x0034
diff --combined drivers/tty/sysrq.c
@@@ -44,6 -44,7 +44,7 @@@
  #include <linux/uaccess.h>
  #include <linux/moduleparam.h>
  #include <linux/jiffies.h>
+ #include <linux/syscalls.h>
  
  #include <asm/ptrace.h>
  #include <asm/irq_regs.h>
@@@ -586,6 -587,7 +587,7 @@@ struct sysrq_state 
  
        /* reset sequence handling */
        bool reset_canceled;
+       bool reset_requested;
        unsigned long reset_keybit[BITS_TO_LONGS(KEY_CNT)];
        int reset_seq_len;
        int reset_seq_cnt;
@@@ -624,18 -626,26 +626,26 @@@ static void sysrq_parse_reset_sequence(
        state->reset_seq_version = sysrq_reset_seq_version;
  }
  
- static void sysrq_do_reset(unsigned long dummy)
+ static void sysrq_do_reset(unsigned long _state)
  {
-       __handle_sysrq(sysrq_xlate[KEY_B], false);
+       struct sysrq_state *state = (struct sysrq_state *) _state;
+       state->reset_requested = true;
+       sys_sync();
+       kernel_restart(NULL);
  }
  
  static void sysrq_handle_reset_request(struct sysrq_state *state)
  {
+       if (state->reset_requested)
+               __handle_sysrq(sysrq_xlate[KEY_B], false);
        if (sysrq_reset_downtime_ms)
                mod_timer(&state->keyreset_timer,
                        jiffies + msecs_to_jiffies(sysrq_reset_downtime_ms));
        else
-               sysrq_do_reset(0);
+               sysrq_do_reset((unsigned long)state);
  }
  
  static void sysrq_detect_reset_sequence(struct sysrq_state *state,
@@@ -837,7 -847,8 +847,8 @@@ static int sysrq_connect(struct input_h
        sysrq->handle.handler = handler;
        sysrq->handle.name = "sysrq";
        sysrq->handle.private = sysrq;
-       setup_timer(&sysrq->keyreset_timer, sysrq_do_reset, 0);
+       setup_timer(&sysrq->keyreset_timer,
+                   sysrq_do_reset, (unsigned long)sysrq);
  
        error = input_register_handle(&sysrq->handle);
        if (error) {
@@@ -932,7 -943,7 +943,7 @@@ static int sysrq_reset_seq_param_set(co
        unsigned long val;
        int error;
  
 -      error = strict_strtoul(buffer, 0, &val);
 +      error = kstrtoul(buffer, 0, &val);
        if (error < 0)
                return error;