1. 22 9月, 2020 1 次提交
  2. 09 9月, 2020 2 次提交
    • H
      HID: ite: Add USB id match for Acer One S1003 keyboard dock · 5bf2f2f3
      Hans de Goede 提交于
      The Acer One S1003 2-in-1 keyboard dock uses a Synaptics S910xx touchpad
      which is connected to an ITE 8910 USB keyboard controller chip.
      
      This keyboard has the same quirk for its rfkill / airplane mode hotkey as
      other keyboards with ITE keyboard chips, it only sends a single release
      event when pressed and released, it never sends a press event.
      
      This commit adds this keyboards USB id to the hid-ite id-table, fixing
      the rfkill key not working on this keyboard. Note that like for the
      Acer Aspire Switch 10 (SW5-012) the id-table entry matches on the
      HID_GROUP_GENERIC generic group so that hid-ite only binds to the
      keyboard interface and the mouse/touchpad interface is left untouched
      so that hid-multitouch can bind to it.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5bf2f2f3
    • D
      HID: roccat: add bounds checking in kone_sysfs_write_settings() · d4f98dbf
      Dan Carpenter 提交于
      This code doesn't check if "settings->startup_profile" is within bounds
      and that could result in an out of bounds array access.  What the code
      does do is it checks if the settings can be written to the firmware, so
      it's possible that the firmware has a bounds check?  It's safer and
      easier to verify when the bounds checking is done in the kernel.
      
      Fixes: 14bf62cd ("HID: add driver for Roccat Kone gaming mouse")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d4f98dbf
  3. 01 9月, 2020 3 次提交
  4. 31 8月, 2020 2 次提交
  5. 19 8月, 2020 1 次提交
  6. 17 8月, 2020 5 次提交
  7. 21 7月, 2020 1 次提交
  8. 20 7月, 2020 3 次提交
  9. 14 7月, 2020 1 次提交
    • G
      HID: input: Fix devices that return multiple bytes in battery report · 4f57cace
      Grant Likely 提交于
      Some devices, particularly the 3DConnexion Spacemouse wireless 3D
      controllers, return more than just the battery capacity in the battery
      report. The Spacemouse devices return an additional byte with a device
      specific field. However, hidinput_query_battery_capacity() only
      requests a 2 byte transfer.
      
      When a spacemouse is connected via USB (direct wire, no wireless dongle)
      and it returns a 3 byte report instead of the assumed 2 byte battery
      report the larger transfer confuses and frightens the USB subsystem
      which chooses to ignore the transfer. Then after 2 seconds assume the
      device has stopped responding and reset it. This can be reproduced
      easily by using a wired connection with a wireless spacemouse. The
      Spacemouse will enter a loop of resetting every 2 seconds which can be
      observed in dmesg.
      
      This patch solves the problem by increasing the transfer request to 4
      bytes instead of 2. The fix isn't particularly elegant, but it is simple
      and safe to backport to stable kernels. A further patch will follow to
      more elegantly handle battery reports that contain additional data.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Darren Hart <darren@dvhart.com>
      Cc: Jiri Kosina <jikos@kernel.org>
      Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
      Cc: stable@vger.kernel.org
      Tested-by: NDarren Hart <dvhart@infradead.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4f57cace
  10. 07 7月, 2020 9 次提交
  11. 24 6月, 2020 2 次提交
    • J
      HID: quirks: Ignore Simply Automated UPB PIM · 1ee1369b
      James Hilliard 提交于
      As this is a cypress HID->COM RS232 style device that is handled
      by the cypress_M8 driver we also need to add it to the ignore list
      in hid-quirks.
      
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NJames Hilliard <james.hilliard1@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      1ee1369b
    • H
      HID: apple: Disable Fn-key key-re-mapping on clone keyboards · a5d81646
      Hans de Goede 提交于
      The Maxxter KB-BT-001 Bluetooth keyboard, which looks somewhat like the
      Apple Wireless Keyboard, is using the vendor and product IDs (05AC:0239)
      of the Apple Wireless Keyboard (2009 ANSI version) <sigh>.
      
      But its F1 - F10 keys are marked as sending F1 - F10, not the special
      functions hid-apple.c maps them too; and since its descriptors do not
      contain the HID_UP_CUSTOM | 0x0003 usage apple-hid looks for for the
      Fn-key, apple_setup_input() never gets called, so F1 - F6 are mapped
      to key-codes which have not been set in the keybit array causing them
      to not send any events at all.
      
      The lack of a usage code matching the Fn key in the clone is actually
      useful as this allows solving this problem in a generic way.
      
      This commits adds a fn_found flag and it adds a input_configured
      callback which checks if this flag is set once all usages have been
      mapped. If it is not set, then assume this is a clone and clear the
      quirks bitmap so that the hid-apple code does not add any special
      handling to this keyboard.
      
      This fixes F1 - F6 not sending anything at all and F7 - F12 sending
      the wrong codes on the Maxxter KB-BT-001 Bluetooth keyboard and on
      similar clones.
      
      Cc: Joao Moreno <mail@joaomoreno.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a5d81646
  12. 19 6月, 2020 2 次提交
    • D
      HID: Wiimote: Treat the d-pad as an analogue stick · a8cbf80e
      Daniel G. Morse 提交于
      The controllers from the Super Nintendo Classic Edition (AKA the SNES
      Mini) appear as a Classic Controller Pro when connected to a Wii
      Remote. All the buttons work as the same, with the d-pad being mapped
      the same as the d-pad on the Classic Controller Pro. This differs from
      the behaviour of most controllers with d-pads and no analogue sticks,
      where the d-pad maps to ABS_HAT1X for left and right, and ABS_HAT1Y
      for up and down. This patch adds an option to the hid-wiimote module
      to make the Super Nintendo Classic Controller behave this way.
      
      The patch has been tested with a Super Nintendo Classic Controller
      plugged into a Wii Remote in both with the option both enabled and
      disabled. When enabled the d-pad acts as the analogue control, and
      when disabled it acts as it did before the patch was applied. This
      patch has not been tested with e Wii Classic Controller (either the
      original or the pro version) as I do not have one of these
      controllers.
      
      Although I have not tested it with these controllers, I think it is
      likely this patch will also work with the NES Classic Edition
      Controllers.
      Signed-off-by: NDaniel G. Morse <dmorse@speedfox.co.uk>
      Reviewed-by: NDavid Rheinsberg <david.rheinsberg@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a8cbf80e
    • R
      HID: steam: fixes race in handling device list. · 2d3f53a8
      Rodrigo Rivas Costa 提交于
      Using uhid and KASAN this driver crashed because it was getting
      several connection events where it only expected one. Then the
      device was added several times to the static device list and it got
      corrupted.
      
      This patch checks if the device is already in the list before adding
      it.
      Signed-off-by: NRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
      Tested-by: NSiarhei Vishniakou <svv@google.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2d3f53a8
  13. 16 6月, 2020 7 次提交
  14. 14 6月, 2020 1 次提交
    • M
      treewide: replace '---help---' in Kconfig files with 'help' · a7f7f624
      Masahiro Yamada 提交于
      Since commit 84af7a61 ("checkpatch: kconfig: prefer 'help' over
      '---help---'"), the number of '---help---' has been gradually
      decreasing, but there are still more than 2400 instances.
      
      This commit finishes the conversion. While I touched the lines,
      I also fixed the indentation.
      
      There are a variety of indentation styles found.
      
        a) 4 spaces + '---help---'
        b) 7 spaces + '---help---'
        c) 8 spaces + '---help---'
        d) 1 space + 1 tab + '---help---'
        e) 1 tab + '---help---'    (correct indentation)
        f) 1 tab + 1 space + '---help---'
        g) 1 tab + 2 spaces + '---help---'
      
      In order to convert all of them to 1 tab + 'help', I ran the
      following commend:
      
        $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'
      Signed-off-by: NMasahiro Yamada <masahiroy@kernel.org>
      a7f7f624