1. 17 1月, 2023 6 次提交
  2. 20 12月, 2022 1 次提交
    • J
      HID: input: map battery system charging · a608dc1c
      José Expósito 提交于
      HID descriptors with Battery System (0x85) Charging (0x44) usage are
      ignored and POWER_SUPPLY_STATUS_DISCHARGING is always reported to user
      space, even when the device is charging.
      
      Map this usage and when it is reported set the right charging status.
      
      In addition, add KUnit tests to make sure that the charging status is
      correctly set and reported. They can be run with the usual command:
      
          $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid
      Signed-off-by: NJosé Expósito <jose.exposito89@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      a608dc1c
  3. 20 9月, 2022 3 次提交
  4. 01 3月, 2022 6 次提交
  5. 06 1月, 2022 1 次提交
  6. 14 12月, 2021 4 次提交
  7. 02 12月, 2021 3 次提交
  8. 25 6月, 2021 1 次提交
    • H
      HID: core: Add hid_hw_may_wakeup() function · 24e166f4
      Hans de Goede 提交于
      Add a hid_hw_may_wakeup() function, which is the equivalent of
      device_may_wakeup() for hid devices.
      
      In most cases this just returns device_may_wakeup(hdev->dev.parent), but for
      some ll-drivers this is not correct. E.g. usb_hid_driver instantiated hid
      devices have their parent set to the usb-interface to which the usb_hid_driver
      is bound, but the power/wakeup* sysfs attributes are part of the usb-device,
      which is the usb-interface's parent.
      
      For these special cases a new may_wakeup callback is added to
      hid_ll_driver, so that ll-drivers can override the default behavior.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      24e166f4
  9. 24 6月, 2021 1 次提交
  10. 05 5月, 2021 1 次提交
  11. 07 4月, 2021 1 次提交
  12. 08 3月, 2021 1 次提交
    • M
      HID: plantronics: Workaround for double volume key presses · f567d6ef
      Maxim Mikityanskiy 提交于
      Plantronics Blackwire 3220 Series (047f:c056) sends HID reports twice
      for each volume key press. This patch adds a quirk to hid-plantronics
      for this product ID, which will ignore the second volume key press if
      it happens within 5 ms from the last one that was handled.
      
      The patch was tested on the mentioned model only, it shouldn't affect
      other models, however, this quirk might be needed for them too.
      Auto-repeat (when a key is held pressed) is not affected, because the
      rate is about 3 times per second, which is far less frequent than once
      in 5 ms.
      
      Fixes: 81bb773f ("HID: plantronics: Update to map volume up/down controls")
      Signed-off-by: NMaxim Mikityanskiy <maxtram95@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f567d6ef
  13. 26 1月, 2021 1 次提交
  14. 27 11月, 2020 1 次提交
    • D
      HID: Increase HID maximum report size to 16KB · 6a0eaf51
      Dean Camera 提交于
      Currently the maximum HID report size which can be buffered by the kernel is
      8KB. This is sufficient for the vast majority of HID devices on the market, as
      most HID reports are fairly small.
      
      However, some unusual devices such as the Elgate Stream Deck exist which use a
      report size slightly over 8KB for the image data that is sent to the device.
      Reports these large cannot be buffered by the regular HID subsystem currently,
      thus the only way to use such device is to bypass the HID subsystem entirely.
      
      This increases the maximum HID report size to 16KB, which should cover all
      sanely designed HID devices.
      Signed-off-by: NDean Camera <dean@fourwalledcubicle.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6a0eaf51
  15. 29 10月, 2020 1 次提交
  16. 01 10月, 2020 1 次提交
  17. 01 9月, 2020 1 次提交
    • M
      HID: core: Sanitize event code and type when mapping input · 35556bed
      Marc Zyngier 提交于
      When calling into hid_map_usage(), the passed event code is
      blindly stored as is, even if it doesn't fit in the associated bitmap.
      
      This event code can come from a variety of sources, including devices
      masquerading as input devices, only a bit more "programmable".
      
      Instead of taking the event code at face value, check that it actually
      fits the corresponding bitmap, and if it doesn't:
      - spit out a warning so that we know which device is acting up
      - NULLify the bitmap pointer so that we catch unexpected uses
      
      Code paths that can make use of untrusted inputs can now check
      that the mapping was indeed correct and bail out if not.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com>
      35556bed
  18. 12 2月, 2020 1 次提交
    • J
      HID: core: increase HID report buffer size to 8KiB · 84a40626
      Johan Korsnes 提交于
      We have a HID touch device that reports its opens and shorts test
      results in HID buffers of size 8184 bytes. The maximum size of the HID
      buffer is currently set to 4096 bytes, causing probe of this device to
      fail. With this patch we increase the maximum size of the HID buffer to
      8192 bytes, making device probe and acquisition of said buffers succeed.
      Signed-off-by: NJohan Korsnes <jkorsnes@cisco.com>
      Cc: Alan Stern <stern@rowland.harvard.edu>
      Cc: Armando Visconti <armando.visconti@st.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      84a40626
  19. 18 9月, 2019 2 次提交
  20. 31 5月, 2019 1 次提交
  21. 24 4月, 2019 2 次提交