1. 19 11月, 2020 2 次提交
    • H
      HID: logitech-dj: Fix Dinovo Mini when paired with a MX5x00 receiver · b4c00e79
      Hans de Goede 提交于
      Some users are pairing the Dinovo keyboards with the MX5000 or MX5500
      receivers, instead of with the Dinovo receivers. The receivers are
      mostly the same (and the air protocol obviously is compatible) but
      currently the Dinovo receivers are handled by hid-lg.c while the
      MX5x00 receivers are handled by logitech-dj.c.
      
      When using a Dinovo keyboard, with its builtin touchpad, through
      logitech-dj.c then the touchpad stops working because when asking the
      receiver for paired devices, we get only 1 paired device with
      a device_type of REPORT_TYPE_KEYBOARD. And since we don't see a paired
      mouse, we have nowhere to send mouse-events to, so we drop them.
      
      Extend the existing fix for the Dinovo Edge for this to also cover the
      Dinovo Mini keyboard and also add a mapping to logitech-hidpp for the
      Media key on the Dinovo Mini, so that that keeps working too.
      
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1811424
      Fixes: f2113c30 ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      b4c00e79
    • H
      HID: logitech-dj: Fix an error in mse_bluetooth_descriptor · eec231e0
      Hans de Goede 提交于
      Fix an error in the mouse / INPUT(2) descriptor used for quad/bt2.0 combo
      receivers. Replace INPUT with INPUT (Data,Var,Abs) for the field for the
      4 extra buttons which share their report-byte with the low-res hwheel.
      
      This is likely a copy and paste error. I've verified that the new
      0x81, 0x02 value matches both the mouse descriptor for the currently
      supported MX5000 / MX5500 receivers, as well as the INPUT(2) mouse
      descriptors for the Dinovo receivers for which support is being
      worked on.
      
      Cc: stable@vger.kernel.org
      Fixes: f2113c30 ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      eec231e0
  2. 12 11月, 2020 3 次提交
    • H
      HID: Add Logitech Dinovo Edge battery quirk · 7940fb03
      Hans de Goede 提交于
      The battery status is also being reported by the logitech-hidpp driver,
      so ignore the standard HID battery status to avoid reporting the same
      info twice.
      
      Note the logitech-hidpp battery driver provides more info, such as properly
      differentiating between charging and discharging. Also the standard HID
      battery info seems to be wrong, reporting a capacity of just 26% after
      fully charging the device.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      7940fb03
    • H
      HID: logitech-hidpp: Add HIDPP_CONSUMER_VENDOR_KEYS quirk for the Dinovo Edge · c27168a0
      Hans de Goede 提交于
      Like the MX5000 and MX5500 quad/bluetooth keyboards the Dinovo Edge also
      needs the HIDPP_CONSUMER_VENDOR_KEYS quirk for some special keys to work.
      Specifically without this the "Phone" and the 'A' - 'D' Smart Keys do not
      send any events.
      
      In addition to fixing these keys not sending any events, adding the
      Bluetooth match, so that hid-logitech-hidpp is used instead of the
      generic HID driver, also adds battery monitoring support when the
      keyboard is connected over Bluetooth.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      c27168a0
    • H
      HID: logitech-dj: Handle quad/bluetooth keyboards with a builtin trackpad · ee5e5841
      Hans de Goede 提交于
      Some quad/bluetooth keyboards, such as the Dinovo Edge (Y-RAY81) have a
      builtin touchpad. In this case when asking the receiver for paired devices,
      we get only 1 paired device with a device_type of REPORT_TYPE_KEYBOARD.
      
      This means that we do not instantiate a second dj_hiddev for the mouse
      (as we normally would) and thus there is no place for us to forward the
      mouse input reports to, causing the touchpad part of the keyboard to not
      work.
      
      There is no way for us to detect these keyboards, so this commit adds
      an array with device-ids for such keyboards and when a keyboard is on
      this list it adds STD_MOUSE to the reports_supported bitmap for the
      dj_hiddev created for the keyboard fixing the touchpad not working.
      
      Using a list of device-ids for this is not ideal, but there are only
      very few such keyboards so this should be fine. Besides the Dinovo Edge,
      other known wireless Logitech keyboards with a builtin touchpad are:
      
      * Dinovo Mini (TODO add its device-id to the list)
      * K400 (uses a unifying receiver so is not affected)
      * K600 (uses a unifying receiver so is not affected)
      
      Cc: stable@vger.kernel.org
      BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1811424
      Fixes: f2113c30 ("HID: logitech-dj: add support for Logitech Bluetooth Mini-Receiver")
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      ee5e5841
  3. 09 11月, 2020 1 次提交
  4. 05 11月, 2020 2 次提交
  5. 29 10月, 2020 1 次提交
    • H
      HID: i2c-hid: Put ACPI enumerated devices in D3 on shutdown · 5c7e02a8
      Hans de Goede 提交于
      The i2c-hid driver would quietly fail to probe the i2c-hid sensor-hub
      with an ACPI device-id of SMO91D0 every other boot.
      
      Specifically, the i2c_smbus_read_byte() "Make sure there is something at
      this address" check would fail every other boot.
      
      It seems that the BIOS does not properly reset/power-cycle the device
      leaving it in a confused state where it refuses to respond to i2c-xfers.
      On boots where probing the device failed, the driver-core puts the device
      in D3 after the probe-failure, which causes the probe to succeed the next
      boot.
      
      Putting the device in D3 from the shutdown-handler fixes the sensors not
      working every other boot.
      
      This has been tested on both a Lenovo Miix 2-10 and a Dell Venue 8 Pro 5830
      both of which use an i2c-hid sensor-hub with an ACPI id of SMO91D0.
      
      Note that it is safe to call acpi_device_set_power() with a NULL pointer
      as first argument, so on none ACPI enumerated devices this change is a
      no-op.
      
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5c7e02a8
  6. 24 10月, 2020 1 次提交
  7. 23 10月, 2020 1 次提交
    • F
      HID: cypress: Support Varmilo Keyboards' media hotkeys · 652f3d00
      Frank Yang 提交于
      The Varmilo VA104M Keyboard (04b4:07b1, reported as Varmilo Z104M)
      exposes media control hotkeys as a USB HID consumer control device, but
      these keys do not work in the current (5.8-rc1) kernel due to the
      incorrect HID report descriptor. Fix the problem by modifying the
      internal HID report descriptor.
      
      More specifically, the keyboard report descriptor specifies the
      logical boundary as 572~10754 (0x023c ~ 0x2a02) while the usage
      boundary is specified as 0~10754 (0x00 ~ 0x2a02). This results in an
      incorrect interpretation of input reports, causing inputs to be ignored.
      By setting the Logical Minimum to zero, we align the logical boundary
      with the Usage ID boundary.
      
      Some notes:
      
      * There seem to be multiple variants of the VA104M keyboard. This
        patch specifically targets 04b4:07b1 variant.
      
      * The device works out-of-the-box on Windows platform with the generic
        consumer control device driver (hidserv.inf). This suggests that
        Windows either ignores the Logical Minimum/Logical Maximum or
        interprets the Usage ID assignment differently from the linux
        implementation; Maybe there are other devices out there that only
        works on Windows due to this problem?
      Signed-off-by: NFrank Yang <puilp0502@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      652f3d00
  8. 22 10月, 2020 3 次提交
  9. 16 10月, 2020 1 次提交
  10. 05 10月, 2020 1 次提交
  11. 01 10月, 2020 1 次提交
  12. 30 9月, 2020 1 次提交
  13. 28 9月, 2020 1 次提交
  14. 26 9月, 2020 1 次提交
  15. 25 9月, 2020 1 次提交
    • J
      HID: wacom: Avoid entering wacom_wac_pen_report for pad / battery · d9216d75
      Jason Gerecke 提交于
      It has recently been reported that the "heartbeat" report from devices
      like the 2nd-gen Intuos Pro (PTH-460, PTH-660, PTH-860) or the 2nd-gen
      Bluetooth-enabled Intuos tablets (CTL-4100WL, CTL-6100WL) can cause the
      driver to send a spurious BTN_TOUCH=0 once per second in the middle of
      drawing. This can result in broken lines while drawing on Chrome OS.
      
      The source of the issue has been traced back to a change which modified
      the driver to only call `wacom_wac_pad_report()` once per report instead
      of once per collection. As part of this change, pad-handling code was
      removed from `wacom_wac_collection()` under the assumption that the
      `WACOM_PEN_FIELD` and `WACOM_TOUCH_FIELD` checks would not be satisfied
      when a pad or battery collection was being processed.
      
      To be clear, the macros `WACOM_PAD_FIELD` and `WACOM_PEN_FIELD` do not
      currently check exclusive conditions. In fact, most "pad" fields will
      also appear to be "pen" fields simply due to their presence inside of
      a Digitizer application collection. Because of this, the removal of
      the check from `wacom_wac_collection()` just causes pad / battery
      collections to instead trigger a call to `wacom_wac_pen_report()`
      instead. The pen report function in turn resets the tip switch state
      just prior to exiting, resulting in the observed BTN_TOUCH=0 symptom.
      
      To correct this, we restore a version of the `WACOM_PAD_FIELD` check
      in `wacom_wac_collection()` and return early. This effectively prevents
      pad / battery collections from being reported until the very end of the
      report as originally intended.
      
      Fixes: d4b8efeb ("HID: wacom: generic: Correct pad syncing")
      Cc: stable@vger.kernel.org # v4.17+
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <ping.cheng@wacom.com>
      Tested-by: NPing Cheng <ping.cheng@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      d9216d75
  16. 23 9月, 2020 2 次提交
    • X
      HID: i2c-hid: fix kerneldoc warnings in i2c-hid-core.c · ca43ab1e
      Xiaofei Tan 提交于
      Fix following warnings caused by mismatch bewteen function parameters
      and comments.
      drivers/hid/i2c-hid/i2c-hid-core.c:331: warning: Function parameter or member 'data_len' not described in 'i2c_hid_set_or_send_report'
      drivers/hid/i2c-hid/i2c-hid-core.c:331: warning: Excess function parameter 'len' description in 'i2c_hid_set_or_send_report'
      Signed-off-by: NXiaofei Tan <tanxiaofei@huawei.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ca43ab1e
    • X
      HID: core: fix kerneldoc warnings in hid-core.c · 5f94e9c8
      Xiaofei Tan 提交于
      Fix following warnings caused by mismatch bewteen function parameters
      and comments.
      drivers/hid/hid-core.c:931: warning: Function parameter or member 'hid' not described in 'hid_parse_report'
      drivers/hid/hid-core.c:931: warning: Excess function parameter 'device' description in 'hid_parse_report'
      drivers/hid/hid-core.c:961: warning: Function parameter or member 'hid' not described in 'hid_validate_values'
      drivers/hid/hid-core.c:961: warning: Excess function parameter 'device' description in 'hid_validate_values'
      drivers/hid/hid-core.c:1452: warning: Function parameter or member 'report' not described in 'hid_match_report'
      drivers/hid/hid-core.c:1452: warning: Excess function parameter 'report_type' description in 'hid_match_report'
      drivers/hid/hid-core.c:2132: warning: Function parameter or member 'drv' not described in 'new_id_store'
      drivers/hid/hid-core.c:2132: warning: Excess function parameter 'driver' description in 'new_id_store'
      Signed-off-by: NXiaofei Tan <tanxiaofei@huawei.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5f94e9c8
  17. 22 9月, 2020 4 次提交
  18. 09 9月, 2020 4 次提交
    • L
      HID: hid-debug: fix nonblocking read semantics wrt EIO/ERESTARTSYS · c27e0882
      Laurent Gauthier 提交于
      When the file has been open in non-blocking mode, EIO or ERESTARTSYS
      would never be returned even if they should (for example when device
      has been unplugged, you want EIO and not EAGAIN to be returned).
      
      Move the O_NONBLOCK check after other checks have been performed.
      
      Based on similar to patches hidraw and hiddev by Founder Fang
      <founder.fang@gmail.com> and Jiri Kosina <jkosina@suse.cz>.
      Signed-off-by: NLaurent Gauthier <laurent.gauthier@soccasys.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      c27e0882
    • D
      HID: i2c-hid: Prefer asynchronous probe · eafb2203
      Douglas Anderson 提交于
      Adding printouts to the i2c_hid_probe() function shows that it takes
      quite some time.  It used to take about 70 ms, but after commit
      eef40162 ("HID: i2c-hid: Always sleep 60ms after I2C_HID_PWR_ON
      commands") it takes about 190 ms.  This is not tons of time but it's
      not trivial.  Because we haven't yet specified that we'd prefer
      asynchronous probe for this driver then, if the driver is builtin to
      the kernel, we'll wait for this driver to finish before we start
      probes for more drivers.  Let's set the flag to enable asynchronous
      for this driver so that other drivers aren't blocked from probing
      until we finish.
      
      Since this driver can be configured as a module and modules are
      always asynchronously probed this is quite a safe change and will
      benefit anyone who has a reason to build this driver into the kernel
      instead of using it as a module.
      
      [jkosina@suse.cz: drop spurious whitespace addition]
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      eafb2203
    • 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
  19. 07 9月, 2020 2 次提交
  20. 03 9月, 2020 1 次提交
    • S
      media: rc: harmonize infrared durations to microseconds · 528222d8
      Sean Young 提交于
      rc-core kapi uses nanoseconds for infrared durations for receiving, and
      microseconds for sending. The uapi already uses microseconds for both,
      so this patch does not change the uapi.
      
      Infrared durations do not need nanosecond resolution. IR protocols do not
      have durations shorter than about 100 microseconds. Some IR hardware offers
      250 microseconds resolution, which is sufficient for most protocols.
      Better hardware has 50 microsecond resolution and is enough for every
      protocol I am aware off.
      
      Unify on microseconds everywhere. This simplifies the code since less
      conversion between microseconds and nanoseconds needs to be done.
      
      This affects:
       - rx_resolution member of struct rc_dev
       - timeout member of struct rc_dev
       - duration member in struct ir_raw_event
      
      Cc: "Bruno Prémont" <bonbons@linux-vserver.org>
      Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>
      Cc: Maxim Levitsky <maximlevitsky@gmail.com>
      Cc: Patrick Lerda <patrick9876@free.fr>
      Cc: Kevin Hilman <khilman@baylibre.com>
      Cc: Neil Armstrong <narmstrong@baylibre.com>
      Cc: Jerome Brunet <jbrunet@baylibre.com>
      Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
      Cc: Sean Wang <sean.wang@mediatek.com>
      Cc: Matthias Brugger <matthias.bgg@gmail.com>
      Cc: Patrice Chotard <patrice.chotard@st.com>
      Cc: Maxime Ripard <mripard@kernel.org>
      Cc: Chen-Yu Tsai <wens@csie.org>
      Cc: "David Härdeman" <david@hardeman.nu>
      Cc: Benjamin Valentin <benpicco@googlemail.com>
      Cc: Antti Palosaari <crope@iki.fi>
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
      528222d8
  21. 01 9月, 2020 4 次提交
  22. 31 8月, 2020 2 次提交