)]}'
{
  "commit": "153274cb1c62eb70fd09e2fbb85aa30597607361",
  "tree": "7d20529241da0c70aaaf2eec3877eca76e20dd73",
  "parents": [
    "fb7bc3a2bb987865e149f6baa2a3d22dd18b201e"
  ],
  "author": {
    "name": "Candle Sun",
    "email": "candle.sun@unisoc.com",
    "time": "Tue Oct 22 22:21:39 2019 +0800"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Wed Dec 04 22:34:29 2019 +0100"
  },
  "message": "HID: core: check whether Usage Page item is after Usage ID items\n\ncommit 1cb0d2aee26335d0bccf29100c7bed00ebece851 upstream.\n\nUpstream commit 58e75155009c (\"HID: core: move Usage Page concatenation\nto Main item\") adds support for Usage Page item after Usage ID items\n(such as keyboards manufactured by Primax).\n\nUsage Page concatenation in Main item works well for following report\ndescriptor patterns:\n\n    USAGE_PAGE (Keyboard)                   05 07\n    USAGE_MINIMUM (Keyboard LeftControl)    19 E0\n    USAGE_MAXIMUM (Keyboard Right GUI)      29 E7\n    LOGICAL_MINIMUM (0)                     15 00\n    LOGICAL_MAXIMUM (1)                     25 01\n    REPORT_SIZE (1)                         75 01\n    REPORT_COUNT (8)                        95 08\n    INPUT (Data,Var,Abs)                    81 02\n\n-------------\n\n    USAGE_MINIMUM (Keyboard LeftControl)    19 E0\n    USAGE_MAXIMUM (Keyboard Right GUI)      29 E7\n    LOGICAL_MINIMUM (0)                     15 00\n    LOGICAL_MAXIMUM (1)                     25 01\n    REPORT_SIZE (1)                         75 01\n    REPORT_COUNT (8)                        95 08\n    USAGE_PAGE (Keyboard)                   05 07\n    INPUT (Data,Var,Abs)                    81 02\n\nBut it makes the parser act wrong for the following report\ndescriptor pattern(such as some Gamepads):\n\n    USAGE_PAGE (Button)                     05 09\n    USAGE (Button 1)                        09 01\n    USAGE (Button 2)                        09 02\n    USAGE (Button 4)                        09 04\n    USAGE (Button 5)                        09 05\n    USAGE (Button 7)                        09 07\n    USAGE (Button 8)                        09 08\n    USAGE (Button 14)                       09 0E\n    USAGE (Button 15)                       09 0F\n    USAGE (Button 13)                       09 0D\n    USAGE_PAGE (Consumer Devices)           05 0C\n    USAGE (Back)                            0a 24 02\n    USAGE (HomePage)                        0a 23 02\n    LOGICAL_MINIMUM (0)                     15 00\n    LOGICAL_MAXIMUM (1)                     25 01\n    REPORT_SIZE (1)                         75 01\n    REPORT_COUNT (11)                       95 0B\n    INPUT (Data,Var,Abs)                    81 02\n\nWith Usage Page concatenation in Main item, parser recognizes all the\n11 Usages as consumer keys, it is not the HID device\u0027s real intention.\n\nThis patch checks whether Usage Page is really defined after Usage ID\nitems by comparing usage page using status.\n\nUsage Page concatenation on currently defined Usage Page will always\ndo in local parsing when Usage ID items encountered.\n\nWhen Main item is parsing, concatenation will do again with last\ndefined Usage Page if this page has not been used in the previous\nusages concatenation.\n\nSigned-off-by: Candle Sun \u003ccandle.sun@unisoc.com\u003e\nSigned-off-by: Nianfu Bai \u003cnianfu.bai@unisoc.com\u003e\nCc: Benjamin Tissoires \u003cbenjamin.tissoires@redhat.com\u003e\nSigned-off-by: Jiri Kosina \u003cjkosina@suse.cz\u003e\nCc: Siarhei Vishniakou \u003csvv@google.com\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3af76624e4aadef1c95e2f6656432bb619b9e8d1",
      "old_mode": 33188,
      "old_path": "drivers/hid/hid-core.c",
      "new_id": "12149c5c39e4002f6e02104ad6b20353626a3216",
      "new_mode": 33188,
      "new_path": "drivers/hid/hid-core.c"
    }
  ]
}
