]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branches 'for-3.16/i2c-hid', 'for-3.16/rmi4', 'for-3.16/sony' and 'for-3.16...
authorJiri Kosina <jkosina@suse.cz>
Wed, 4 Jun 2014 11:09:43 +0000 (13:09 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 4 Jun 2014 11:09:43 +0000 (13:09 +0200)
1  2  3  4  5 
drivers/hid/Kconfig
drivers/hid/hid-core.c
drivers/leds/Kconfig
include/linux/hid.h
include/uapi/linux/input.h

diff --combined drivers/hid/Kconfig
index 00e01383bf30ae2ee3632f71e7f9f56557309d1b,7af9d0b5dea16f427987e234952c44cd53c540fc,762f15d6ed88bc7f1baf6d94d12065d3286d611f,7af9d0b5dea16f427987e234952c44cd53c540fc,7af9d0b5dea16f427987e234952c44cd53c540fc..800c8b60f7a2c6d01024060cb30493a583984f7d
@@@@@@ -608,10 -608,7 -608,7 -608,7 -608,7 +608,10 @@@@@@ config HID_SAITE
        Support for Saitek devices that are not fully compliant with the
        HID standard.
     
 ----   Currently only supports the PS1000 controller.
 ++++   Supported devices:
 ++++   - PS1000 Dual Analog Pad
 ++++   - R.A.T.7 Gaming Mouse
 ++++   - M.M.O.7 Gaming Mouse
     
     config HID_SAMSUNG
        tristate "Samsung InfraRed remote control or keyboards"
@@@@@@ -660,6 -657,6 -657,14 -657,6 -657,6 +660,14 @@@@@@ config HID_SUNPLU
        ---help---
        Support for Sunplus wireless desktop.
     
++ ++config HID_RMI
++ ++   tristate "Synaptics RMI4 device support"
++ ++   depends on HID
++ ++   ---help---
++ ++   Support for Synaptics RMI4 touchpads.
++ ++   Say Y here if you have a Synaptics RMI4 touchpads over i2c-hid or usbhid
++ ++   and want support for its special functionalities.
++ ++
     config HID_GREENASIA
        tristate "GreenAsia (Product ID 0x12) game controller support"
        depends on HID
diff --combined drivers/hid/hid-core.c
index 77e04088476969ea9ec2a7b6f48b6330f11a30be,da52279de939652c9f1cffc1f60cf4308ce795ea,64c71c866916724bf712851078a1b311d4173551,10a2c08664596a3c43d1687cab911ad3fc3ab970,9e8064205bc792630e6d1937ce97d9cf6a9bed3d..8ed66fd1ea87616416310884de0793d32ffabb6d
@@@@@@ -718,9 -718,9 -718,6 -718,9 -718,6 +718,9 @@@@@@ static int hid_scan_main(struct hid_par
        case HID_MAIN_ITEM_TAG_END_COLLECTION:
                break;
        case HID_MAIN_ITEM_TAG_INPUT:
  + +           /* ignore constant inputs, they will be ignored by hid-input */
  + +           if (data & HID_MAIN_ITEM_CONSTANT)
  + +                   break;
                for (i = 0; i < parser->local.usage_index; i++)
                        hid_scan_input_usage(parser, parser->local.usage[i]);
                break;
@@@@@@ -779,6 -779,6 -776,14 -779,6 -776,6 +779,14 @@@@@@ static int hid_scan_report(struct hid_d
            (hid->group == HID_GROUP_MULTITOUCH))
                hid->group = HID_GROUP_MULTITOUCH_WIN_8;
     
++ ++   /*
++ ++   * Vendor specific handlings
++ ++   */
++ ++   if ((hid->vendor == USB_VENDOR_ID_SYNAPTICS) &&
++ ++       (hid->group == HID_GROUP_GENERIC))
++ ++           /* hid-rmi should take care of them, not hid-generic */
++ ++           hid->group = HID_GROUP_RMI;
++ ++
        vfree(parser);
        return 0;
     }
@@@@@@ -842,17 -842,7 -847,7 -842,7 -839,7 +850,17 @@@@@@ struct hid_report *hid_validate_values(
         * ->numbered being checked, which may not always be the case when
         * drivers go to access report values.
         */
 ----   report = hid->report_enum[type].report_id_hash[id];
 ++++   if (id == 0) {
 ++++           /*
 ++++            * Validating on id 0 means we should examine the first
 ++++            * report in the list.
 ++++            */
 ++++           report = list_entry(
 ++++                           hid->report_enum[type].report_list.next,
 ++++                           struct hid_report, list);
 ++++   } else {
 ++++           report = hid->report_enum[type].report_id_hash[id];
 ++++   }
        if (!report) {
                hid_err(hid, "missing %s %u\n", hid_report_names[type], id);
                return NULL;
@@@@@@ -1263,8 -1253,8 -1258,7 -1253,7 -1250,7 +1271,8 @@@@@@ EXPORT_SYMBOL_GPL(hid_output_report)
     
     static int hid_report_len(struct hid_report *report)
     {
  ---   return ((report->size - 1) >> 3) + 1 + (report->id > 0) + 7;
  +++   /* equivalent to DIV_ROUND_UP(report->size, 8) + !!(report->id > 0) */
  +++   return ((report->size - 1) >> 3) + 1 + (report->id > 0);
     }
     
     /*
@@@@@@ -1277,7 -1267,7 -1271,7 -1266,7 -1263,7 +1285,7 @@@@@@ u8 *hid_alloc_report_buf(struct hid_rep
         * of implement() working on 8 byte chunks
         */
     
  ---   int len = hid_report_len(report);
  +++   int len = hid_report_len(report) + 7;
     
        return kmalloc(len, flags);
     }
@@@@@@ -1835,6 -1825,6 -1829,8 -1824,6 -1821,8 +1843,6 @@@@@@ static const struct hid_device_id hid_h
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
  - -   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TYPE_COVER_2) },
  - -   { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_TOUCH_COVER_2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_OFFICE_KB) },
        { HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
        { HID_USB_DEVICE(USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_TOUCH_SCREEN) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_RYOS_MK_PRO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_SAVU) },
     #endif
 ++++#if IS_ENABLED(CONFIG_HID_SAITEK)
        { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
 ++++   { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_RAT7) },
 ++++   { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_MMO7) },
 ++++#endif
        { 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) },
diff --combined drivers/leds/Kconfig
index 6de9dfbf61c197fe6078a633aabc47cd47805bcf,6de9dfbf61c197fe6078a633aabc47cd47805bcf,72156c123033342f566497155154d31eeef79baf,6de9dfbf61c197fe6078a633aabc47cd47805bcf,46c7d79b6913d9515005d6f34ddb85c56375d5cc..609811e20c227a1db5515a22c2e46fb4598e28b3
@@@@@@ -416,12 -416,12 -416,12 -416,12 -416,12 +416,12 @@@@@@ config LEDS_MC1378
        depends on MFD_MC13XXX
        help
          This option enable support for on-chip LED drivers found
  - -     on Freescale Semiconductor MC13783/MC13892 PMIC.
  + +     on Freescale Semiconductor MC13783/MC13892/MC34708 PMIC.
     
     config LEDS_NS2
        tristate "LED support for Network Space v2 GPIO LEDs"
        depends on LEDS_CLASS
  - -   depends on ARCH_KIRKWOOD
  + +   depends on ARCH_KIRKWOOD || MACH_KIRKWOOD
        default y
        help
          This option enable support for the dual-GPIO LED found on the
     config LEDS_NETXBIG
        tristate "LED support for Big Network series LEDs"
        depends on LEDS_CLASS
  - -   depends on ARCH_KIRKWOOD
  + +   depends on ARCH_KIRKWOOD || MACH_KIRKWOOD
        default y
        help
          This option enable support for LEDs found on the LaCie 2Big
@@@@@@ -474,11 -474,11 -474,11 -474,11 -474,13 +474,13 @@@@@@ config LEDS_LM355
     
     config LEDS_OT200
        tristate "LED support for the Bachmann OT200"
  - -   depends on LEDS_CLASS && HAS_IOMEM
  + +   depends on LEDS_CLASS && HAS_IOMEM && (X86_32 || COMPILE_TEST)
        help
          This option enables support for the LEDs on the Bachmann OT200.
          Say Y to enable LEDs on the Bachmann OT200.
     
++++ comment "LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)"
++++ 
     config LEDS_BLINKM
        tristate "LED support for the BlinkM I2C RGB LED"
        depends on LEDS_CLASS
diff --combined include/linux/hid.h
index a468ec8cc4fe56006cb3ffce8e0dbcf452194ff2,720e3a10608cec94c02c94a6a1053789a567bae5,8ce9ff4d50afdeed74cf7f228bfe708e4487a7d3,720e3a10608cec94c02c94a6a1053789a567bae5,720e3a10608cec94c02c94a6a1053789a567bae5..77632cf159c0d13ba5877a0d5b717b091ce83b4b
@@@@@@ -233,6 -233,11 -233,11 -233,11 -233,11 +233,6 @@@@@@ struct hid_item 
     #define HID_DG_BARRELSWITCH        0x000d0044
     #define HID_DG_ERASER              0x000d0045
     #define HID_DG_TABLETPICK  0x000d0046
 ----/*
 ---- * as of May 20, 2009 the usages below are not yet in the official USB spec
 ---- * but are being pushed by Microsft as described in their paper "Digitizer
 ---- * Drivers for Windows Touch and Pen-Based Computers"
 ---- */
     #define HID_DG_CONFIDENCE  0x000d0047
     #define HID_DG_WIDTH               0x000d0048
     #define HID_DG_HEIGHT              0x000d0049
     #define HID_DG_DEVICEINDEX 0x000d0053
     #define HID_DG_CONTACTCOUNT        0x000d0054
     #define HID_DG_CONTACTMAX  0x000d0055
 ++++#define HID_DG_BARRELSWITCH2       0x000d005a
 ++++#define HID_DG_TOOLSERIALNUMBER    0x000d005b
     
     /*
      * HID report types --- Ouch! HID spec says 1 2 3!
     
     /*
      * HID device groups
++ ++ *
++ ++ * Note: HID_GROUP_ANY is declared in linux/mod_devicetable.h
++ ++ * and has a value of 0x0000
      */
     #define HID_GROUP_GENERIC                  0x0001
     #define HID_GROUP_MULTITOUCH                       0x0002
     #define HID_GROUP_SENSOR_HUB                       0x0003
     #define HID_GROUP_MULTITOUCH_WIN_8         0x0004
     
++ ++/*
++ ++ * Vendor specific HID device groups
++ ++ */
++ ++#define HID_GROUP_RMI                              0x0100
++ ++
     /*
      * This is the global environment of the parser. This information is
      * persistent for main-items. The global environment can be saved and
@@@@@@ -567,6 -570,6 -578,8 -570,6 -570,6 +575,8 @@@@@@ struct hid_descriptor 
        .bus = BUS_USB, .vendor = (ven), .product = (prod)
     #define HID_BLUETOOTH_DEVICE(ven, prod)                                    \
        .bus = BUS_BLUETOOTH, .vendor = (ven), .product = (prod)
++ ++#define HID_I2C_DEVICE(ven, prod)                          \
++ ++   .bus = BUS_I2C, .vendor = (ven), .product = (prod)
     
     #define HID_REPORT_ID(rep) \
        .report_type = (rep)
index b75b5d6116b75e08f1c27d10f33e63fea25ef26e,f4849525519c7a301f4202f68a8eea9fb0e9d296,bd24470d24a2c7a3145af21094e03f67b7ce0761,bd24470d24a2c7a3145af21094e03f67b7ce0761,bd24470d24a2c7a3145af21094e03f67b7ce0761..19df18c9b8be371ec5d13fc09f69fc33f2ff7769
@@@@@@ -164,6 -164,7 -164,6 -164,6 -164,6 +164,7 @@@@@@ struct input_keymap_entry 
     #define INPUT_PROP_DIRECT          0x01    /* direct input devices */
     #define INPUT_PROP_BUTTONPAD               0x02    /* has button(s) under pad */
     #define INPUT_PROP_SEMI_MT         0x03    /* touch rectangle only */
+ +++#define INPUT_PROP_TOPBUTTONPAD            0x04    /* softbuttons at top of pad */
     
     #define INPUT_PROP_MAX                     0x1f
     #define INPUT_PROP_CNT                     (INPUT_PROP_MAX + 1)
     #define KEY_VIDEO_NEXT             241     /* drive next video source */
     #define KEY_VIDEO_PREV             242     /* drive previous video source */
     #define KEY_BRIGHTNESS_CYCLE       243     /* brightness up, after max is min */
 ----#define KEY_BRIGHTNESS_ZERO        244     /* brightness off, use ambient */
 ++++#define KEY_BRIGHTNESS_AUTO        244     /* Set Auto Brightness: manual
 ++++                                     brightness control is off,
 ++++                                     rely on ambient */
 ++++#define KEY_BRIGHTNESS_ZERO        KEY_BRIGHTNESS_AUTO
     #define KEY_DISPLAY_OFF            245     /* display device to off state */
     
     #define KEY_WWAN           246     /* Wireless WAN (LTE, UMTS, GSM, etc.) */
     #define KEY_ADDRESSBOOK            0x1ad   /* AL Contacts/Address Book */
     #define KEY_MESSENGER              0x1ae   /* AL Instant Messaging */
     #define KEY_DISPLAYTOGGLE  0x1af   /* Turn display (LCD) on and off */
 ++++#define KEY_BRIGHTNESS_TOGGLE      KEY_DISPLAYTOGGLE
     #define KEY_SPELLCHECK             0x1b0   /* AL Spell Check */
     #define KEY_LOGOFF         0x1b1   /* AL Logoff */
     
     
     #define KEY_ALS_TOGGLE             0x230   /* Ambient light sensor */
     
 ++++#define KEY_BUTTONCONFIG           0x240   /* AL Button Configuration */
 ++++#define KEY_TASKMANAGER            0x241   /* AL Task/Project Manager */
 ++++#define KEY_JOURNAL                0x242   /* AL Log/Journal/Timecard */
 ++++#define KEY_CONTROLPANEL           0x243   /* AL Control Panel */
 ++++#define KEY_APPSELECT              0x244   /* AL Select Task/Application */
 ++++#define KEY_SCREENSAVER            0x245   /* AL Screen Saver */
 ++++#define KEY_VOICECOMMAND           0x246   /* Listening Voice Command */
 ++++
 ++++#define KEY_BRIGHTNESS_MIN         0x250   /* Set Brightness to Minimum */
 ++++#define KEY_BRIGHTNESS_MAX         0x251   /* Set Brightness to Maximum */
 ++++
     #define BTN_TRIGGER_HAPPY          0x2c0
     #define BTN_TRIGGER_HAPPY1         0x2c0
     #define BTN_TRIGGER_HAPPY2         0x2c1