]> Git Repo - linux.git/commitdiff
Merge branch 'for-4.15/upstream' into for-linus
authorJiri Kosina <[email protected]>
Wed, 15 Nov 2017 10:10:38 +0000 (11:10 +0100)
committerJiri Kosina <[email protected]>
Wed, 15 Nov 2017 10:10:38 +0000 (11:10 +0100)
- cp2112: GPIO error handling and Kconfig fixes from Sébastien Szymanski
- i2c-hid: fixup / quirk for Apollo-Lake based laptops, from Hans de Goede
- Input/Core: add eraser tool support, from Ping Cheng
- small assorted code fixes

Signed-off-by: Jiri Kosina <[email protected]>
1  2 
drivers/hid/Kconfig
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/hid/i2c-hid/i2c-hid.c
include/linux/hid.h

diff --combined drivers/hid/Kconfig
index 374301fcbc86791e5005ba3e1b45a35c496174ad,af061b54c242ce404fa6d21c181ce389773295e1..779c5ae47f36b5857dfed6a67342472ce4ddc571
@@@ -230,7 -230,7 +230,7 @@@ config HID_CMEDI
  
  config HID_CP2112
        tristate "Silicon Labs CP2112 HID USB-to-SMBus Bridge support"
-       depends on USB_HID && I2C && GPIOLIB
+       depends on USB_HID && HIDRAW && I2C && GPIOLIB
        select GPIOLIB_IRQCHIP
        ---help---
        Support for Silicon Labs CP2112 HID USB to SMBus Master Bridge.
@@@ -281,7 -281,6 +281,7 @@@ config HID_ELECO
        Support for ELECOM devices:
          - BM084 Bluetooth Mouse
          - DEFT Trackball (Wired and wireless)
 +        - HUGE Trackball (Wired and wireless)
  
  config HID_ELO
        tristate "ELO USB 4000/4500 touchscreen"
@@@ -750,11 -749,10 +750,10 @@@ config HID_PRIMA
        HID standard.
  
  config HID_RETRODE
-       tristate "Retrode"
+       tristate "Retrode 2 USB adapter for vintage video games"
        depends on USB_HID
        ---help---
        Support for
          * Retrode 2 cartridge and controller adapter
  
  config HID_ROCCAT
diff --combined drivers/hid/hid-core.c
index d3f983a4245a7c8c69549451213a6ebdefb92cab,24e929cbf0e809b9d738dca71a5998dc202fb1ec..f3fcb836a1f9edd0af5b1f31362987d22eff11b2
@@@ -1662,7 -1662,7 +1662,7 @@@ static struct bin_attribute dev_bin_att
        .size = HID_MAX_DESCRIPTOR_SIZE,
  };
  
- static struct device_attribute dev_attr_country = {
+ static const struct device_attribute dev_attr_country = {
        .attr = { .name = "country", .mode = 0444 },
        .show = show_country,
  };
@@@ -1889,9 -1889,6 +1889,9 @@@ static const struct hid_device_id hid_h
  #endif
  #if IS_ENABLED(CONFIG_HID_ALPS)
        { HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_U1_DUAL) },
 +      { HID_I2C_DEVICE(USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_U1_DUAL) },
 +      { HID_I2C_DEVICE(USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_U1) },
 +      { HID_I2C_DEVICE(USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_T4_BTNLESS) },
  #endif
  #if IS_ENABLED(CONFIG_HID_APPLE)
        { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE) },
        { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_T100_KEYBOARD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_ASUS_MD_5112) },
        { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_ASUS_MD_5110) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRED) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRELESS) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRED) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRELESS) },
  #endif
  #if IS_ENABLED(CONFIG_HID_ELO)
        { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb324) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb605) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) },
@@@ -3126,3 -3119,4 +3126,3 @@@ MODULE_AUTHOR("Andreas Gal")
  MODULE_AUTHOR("Vojtech Pavlik");
  MODULE_AUTHOR("Jiri Kosina");
  MODULE_LICENSE("GPL");
 -
diff --combined drivers/hid/hid-ids.h
index c9f7c74b3b60ed5acaef11b64b20220fac10b0f0,bb8e54fbbc21d2029691f05038d19c532f8dd17a..5da3d6256d25353054060dbc8dfbb91ec62ca563
@@@ -77,9 -77,6 +77,9 @@@
  #define HID_DEVICE_ID_ALPS_U1_DUAL    0x120B
  #define HID_DEVICE_ID_ALPS_U1_DUAL_PTP        0x121F
  #define HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP   0x1220
 +#define HID_DEVICE_ID_ALPS_U1         0x1215
 +#define HID_DEVICE_ID_ALPS_T4_BTNLESS 0x120C
 +
  
  #define USB_VENDOR_ID_AMI             0x046b
  #define USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE     0xff10
  #define USB_DEVICE_ID_ASUSTEK_I2C_TOUCHPAD    0x0101
  #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD1 0x1854
  #define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD2 0x1837
 +#define USB_DEVICE_ID_ASUSTEK_ROG_KEYBOARD3 0x1822
  
  #define USB_VENDOR_ID_ATEN            0x0557
  #define USB_DEVICE_ID_ATEN_UC100KM    0x2004
  #define USB_DEVICE_ID_ELECOM_BM084    0x0061
  #define USB_DEVICE_ID_ELECOM_DEFT_WIRED       0x00fe
  #define USB_DEVICE_ID_ELECOM_DEFT_WIRELESS    0x00ff
 +#define USB_DEVICE_ID_ELECOM_HUGE_WIRED       0x010c
 +#define USB_DEVICE_ID_ELECOM_HUGE_WIRELESS    0x010d
  
  #define USB_VENDOR_ID_DREAM_CHEEKY    0x1d34
  #define USB_DEVICE_ID_DREAM_CHEEKY_WN 0x0004
  #define USB_DEVICE_ID_GYRATION_REMOTE_2 0x0003
  #define USB_DEVICE_ID_GYRATION_REMOTE_3 0x0008
  
+ #define I2C_VENDOR_ID_HANTICK         0x0911
+ #define I2C_PRODUCT_ID_HANTICK_5288   0x5288
  #define USB_VENDOR_ID_HANWANG         0x0b57
  #define USB_DEVICE_ID_HANWANG_TABLET_FIRST    0x5000
  #define USB_DEVICE_ID_HANWANG_TABLET_LAST     0x8fff
  #define USB_VENDOR_ID_IDEACOM         0x1cb6
  #define USB_DEVICE_ID_IDEACOM_IDC6650 0x6650
  #define USB_DEVICE_ID_IDEACOM_IDC6651 0x6651
 +#define USB_DEVICE_ID_IDEACOM_IDC6680 0x6680
  
  #define USB_VENDOR_ID_ILITEK          0x222a
  #define USB_DEVICE_ID_ILITEK_MULTITOUCH       0x0001
  #define USB_DEVICE_ID_LENOVO_CBTKBD   0x6048
  #define USB_DEVICE_ID_LENOVO_TPPRODOCK        0x6067
  #define USB_DEVICE_ID_LENOVO_X1_COVER 0x6085
 +#define USB_DEVICE_ID_LENOVO_X1_TAB   0x60a3
  
  #define USB_VENDOR_ID_LG              0x1fd2
  #define USB_DEVICE_ID_LG_MULTITOUCH   0x0064
  #define USB_DEVICE_ID_MCC_PMD1024LS   0x0076
  #define USB_DEVICE_ID_MCC_PMD1208LS   0x007a
  
 +#define USB_VENDOR_ID_MCS             0x16d0
 +#define USB_DEVICE_ID_MCS_GAMEPADBLOCK        0x0bcc
 +
  #define USB_VENDOR_ID_MGE             0x0463
  #define USB_DEVICE_ID_MGE_UPS         0xffff
  #define USB_DEVICE_ID_MGE_UPS1                0x0001
index 9145c2129a967464e1e7ed8978dbe53c6db9e86e,3e0652b6f6579f511cd2b9b2fb05b9c6f247344d..e054ee43c1e275da0adff1d6ee5e8ec49bb1ecbc
@@@ -46,6 -46,7 +46,7 @@@
  
  /* quirks to control the device */
  #define I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV      BIT(0)
+ #define I2C_HID_QUIRK_NO_IRQ_AFTER_RESET      BIT(1)
  
  /* flags */
  #define I2C_HID_STARTED               0
@@@ -168,6 -169,8 +169,8 @@@ static const struct i2c_hid_quirks 
                I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
        { USB_VENDOR_ID_WEIDA, USB_DEVICE_ID_WEIDA_8755,
                I2C_HID_QUIRK_SET_PWR_WAKEUP_DEV },
+       { I2C_VENDOR_ID_HANTICK, I2C_PRODUCT_ID_HANTICK_5288,
+               I2C_HID_QUIRK_NO_IRQ_AFTER_RESET },
        { 0, 0 }
  };
  
@@@ -252,7 -255,9 +255,9 @@@ static int __i2c_hid_command(struct i2c
  
        ret = 0;
  
-       if (wait) {
+       if (wait && (ihid->quirks & I2C_HID_QUIRK_NO_IRQ_AFTER_RESET)) {
+               msleep(100);
+       } else if (wait) {
                i2c_hid_dbg(ihid, "%s: waiting...\n", __func__);
                if (!wait_event_timeout(ihid->wait,
                                !test_bit(I2C_HID_RESET_PENDING, &ihid->flags),
@@@ -543,8 -548,7 +548,8 @@@ static int i2c_hid_alloc_buffers(struc
  {
        /* the worst case is computed from the set_report command with a
         * reportID > 15 and the maximum report length */
 -      int args_len = sizeof(__u8) + /* optional ReportID byte */
 +      int args_len = sizeof(__u8) + /* ReportID */
 +                     sizeof(__u8) + /* optional ReportID byte */
                       sizeof(__u16) + /* data register */
                       sizeof(__u16) + /* size of the report */
                       report_size; /* report */
diff --combined include/linux/hid.h
index 47dd962d9a7a5d002430f7158fb7f5339fe98839,7c3d4a17bbde79409ff9735cb8d9ca01db53bd5b..d491027a7c22059a46e283ffd045fcf080a1b6c0
@@@ -289,7 -289,6 +289,7 @@@ struct hid_item 
  #define HID_DG_DEVICEINDEX    0x000d0053
  #define HID_DG_CONTACTCOUNT   0x000d0054
  #define HID_DG_CONTACTMAX     0x000d0055
 +#define HID_DG_SCANTIME               0x000d0056
  #define HID_DG_BUTTONTYPE     0x000d0059
  #define HID_DG_BARRELSWITCH2  0x000d005a
  #define HID_DG_TOOLSERIALNUMBER       0x000d005b
@@@ -754,6 -753,7 +754,7 @@@ struct hid_driver 
   * @stop: called on remove
   * @open: called by input layer on open
   * @close: called by input layer on close
+  * @power: request underlying hardware to enter requested power mode
   * @parse: this method is called only once to parse the device data,
   *       shouldn't allocate anything to not leak memory
   * @request: send report request to device (e.g. feature report)
This page took 0.109109 seconds and 4 git commands to generate.