1. 21 May, 2019 1 commit
  2. 09 May, 2019 1 commit
  3. 11 Apr, 2019 1 commit
  4. 01 Apr, 2019 1 commit
    • Hui Wang's avatar
      HID: i2c-hid: Disable runtime PM on Synaptics touchpad · 74e7c6c8
      Hui Wang authored
      We have a new Dell laptop which has the synaptics I2C touchpad
      (06cb:7e7e) on it. After booting up the Linux, the touchpad doesn't
      work, there is no interrupt when touching the touchpad, after
      disable the runtime PM, everything works well.
      
      I also tried the quirk of I2C_HID_QUIRK_DELAY_AFTER_SLEEP, it is
      better after applied this quirk, there are interrupts but data it
      reports is invalid.
      Signed-off-by: default avatarHui Wang <hui.wang@canonical.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      74e7c6c8
  5. 21 Jan, 2019 1 commit
  6. 14 Jan, 2019 1 commit
  7. 03 Jan, 2019 1 commit
  8. 19 Nov, 2018 1 commit
    • Kai-Heng Feng's avatar
      HID: i2c-hid: Disable runtime PM for LG touchscreen · 86c31524
      Kai-Heng Feng authored
      LG touchscreen (1fd2:8001) stops working after reboot:
      [ 4.859153] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66)
      [ 4.936070] i2c_hid i2c-SAPS2101:00: i2c_hid_get_input: incomplete report (64/66)
      [ 9.948224] i2c_hid i2c-SAPS2101:00: failed to reset device.
      
      The device in question stops working after receives SLEEP, ON, SLEEP
      commands in a short period. The scenario is like this:
      - Once the desktop session closes, it also closed the hid device, so the
      device gets runtime suspended and receives a SLEEP command.
      - Before calling shutdown callback, it gets runtime resumed and received
      an ON command.
      - In the shutdown callback, it receives another SLEEP command.
      
      I failed to find a reliable interval between ON/SLEEP commands that can
      make it work, so let's simply disable runtime PM for the device.
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      86c31524
  9. 31 Oct, 2018 1 commit
  10. 27 Oct, 2018 1 commit
    • Linus Torvalds's avatar
      i2c-hid: properly terminate i2c_hid_dmi_desc_override_table[] array · b59dfdae
      Linus Torvalds authored
      Commit 9ee3e066 ("HID: i2c-hid: override HID descriptors for certain
      devices") added a new dmi_system_id quirk table to override certain HID
      report descriptors for some systems that lack them.
      
      But the table wasn't properly terminated, causing the dmi matching to
      walk off into la-la-land, and starting to treat random data as dmi
      descriptor pointers, causing boot-time oopses if you were at all
      unlucky.
      
      Terminate the array.
      
      We really should have some way to just statically check that arrays that
      should be terminated by an empty entry actually are so.  But the HID
      people really should have caught this themselves, rather than have me
      deal with an oops during the merge window.  Tssk, tssk.
      
      Cc: Julian Sax <jsbc@gmx.de>
      Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
      Cc: Jiri Kosina <jkosina@suse.cz>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b59dfdae
  11. 26 Oct, 2018 1 commit
  12. 29 Sep, 2018 1 commit
  13. 24 Sep, 2018 1 commit
    • Hans de Goede's avatar
      HID: i2c-hid: Remove RESEND_REPORT_DESCR quirk and its handling · afbb1169
      Hans de Goede authored
      Commit 52cf93e6 ("HID: i2c-hid: Don't reset device upon system resume")
      removes the need for the RESEND_REPORT_DESCR quirk for Raydium devices, but
      kept it for the SIS device id 10FB touchscreens, as the author of that
      commit could not determine if the quirk is still necessary there.
      
      I've tested suspend/resume on a Toshiba Click Mini L9W-B which is the
      device for which this quirk was added in the first place and with the
      "Don't reset device upon system resume" fix the quirk is no longer
      necessary, so this commit removes it.
      
      Note even better I also had some other devices with SIS touchscreens which
      suspend/resume issues, where the RESEND_REPORT_DESCR quirk did not help.
      
      I've also tested these devices with the "Don't reset device upon system
      resume" fix and I'm happy to report that that fix also fixes touchscreen
      resume on the following devices:
      
      Asus T100HA
      Asus T200TA
      Peaq C1010
      
      Cc: Kai-Heng Feng <kai.heng.feng@canonical.com>
      Acked-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      afbb1169
  14. 14 Sep, 2018 1 commit
  15. 06 Sep, 2018 1 commit
    • Kai-Heng Feng's avatar
      HID: i2c-hid: Don't reset device upon system resume · 52cf93e6
      Kai-Heng Feng authored
      Raydium touchscreen triggers interrupt storm after system-wide suspend:
      
      	[ 179.085033] i2c_hid i2c-CUST0000:00: i2c_hid_get_input: incomplete report (58/65535)
      
      According to Raydium, Windows driver does not reset the device after system
      resume.
      
      The HID over I2C spec does specify a reset should be used at intialization, but
      it doesn't specify if reset is required for system suspend.
      
      Tested this patch on other i2c-hid touchpanels I have and those touchpanels do
      work after S3 without doing reset. If any regression happens to other
      touchpanel vendors, we can use quirk for Raydium devices.
      
      There's still one device uses I2C_HID_QUIRK_RESEND_REPORT_DESCR so keep it
      there.
      
      Cc: Aaron Ma <aaron.ma@canonical.com>
      Cc: AceLan Kao <acelan.kao@canonical.com>
      Signed-off-by: default avatarKai-Heng Feng <kai.heng.feng@canonical.com>
      Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      52cf93e6
  16. 28 Aug, 2018 1 commit
  17. 09 Jul, 2018 1 commit
    • Jason Andryuk's avatar
      HID: i2c-hid: Fix "incomplete report" noise · ef6eaf27
      Jason Andryuk authored
      Commit ac75a041 ("HID: i2c-hid: fix size check and type usage") started
      writing messages when the ret_size is <= 2 from i2c_master_recv.  However, my
      device i2c-DLL07D1 returns 2 for a short period of time (~0.5s) after I stop
      moving the pointing stick or touchpad.  It varies, but you get ~50 messages
      each time which spams the log hard.
      
      [  95.925055] i2c_hid i2c-DLL07D1:01: i2c_hid_get_input: incomplete report (83/2)
      
      This has also been observed with a i2c-ALP0017.
      
      [ 1781.266353] i2c_hid i2c-ALP0017:00: i2c_hid_get_input: incomplete report (30/2)
      
      Only print the message when ret_size is totally invalid and less than 2 to cut
      down on the log spam.
      
      Fixes: ac75a041 ("HID: i2c-hid: fix size check and type usage")
      Reported-by: default avatarJohn Smith <john-s-84@gmx.net>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJason Andryuk <jandryuk@gmail.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      ef6eaf27
  18. 25 Jun, 2018 2 commits
  19. 30 May, 2018 1 commit
  20. 15 May, 2018 1 commit
  21. 09 May, 2018 1 commit
  22. 19 Apr, 2018 1 commit
  23. 16 Apr, 2018 2 commits
  24. 12 Apr, 2018 1 commit
  25. 16 Feb, 2018 2 commits
  26. 21 Nov, 2017 1 commit
  27. 09 Nov, 2017 1 commit
    • Hans de Goede's avatar
      HID: i2c-hid: Add no-irq-after-reset quirk for 0911:5288 device · 402946a8
      Hans de Goede authored
      Several cheap Apollo Lake based laptops / 2-in-1s use an i2c-hid mt
      touchpad which is advertised by the DSDT with an ACPI HID of "SYNA3602",
      this touchpad can be found on e.g. the Cube Thinker and the EZBook 3 Pro.
      
      On my "T-bao Tbook air" the i2c-hid driver fails to bind to this touchpad:
      "i2c_hid i2c-SYNA3602:00: failed to reset device.".
      
      After some debuging this it seems that this touchpad simply never sends
      an interrupt after a reset as expected by the i2c hid driver. This commit
      adds a quirk for this device, making i2c_hid_command sleep 100ms after
      a reset instead of waiting for an irq, fixing i2c-hid failing to bind to
      this touchpad.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      402946a8
  28. 13 Sep, 2017 1 commit
  29. 27 Jul, 2017 1 commit
    • Jason Gerecke's avatar
      HID: introduce hid_is_using_ll_driver · fc2237a7
      Jason Gerecke authored
      Although HID itself is transport-agnostic, occasionally a driver may
      want to interact with the low-level transport that a device is connected
      through. To do this, we need to know what kind of bus is in use. The
      first guess may be to look at the 'bus' field of the 'struct hid_device',
      but this field may be emulated in some cases (e.g. uhid).
      
      More ideally, we can check which ll_driver a device is using. This
      function introduces a 'hid_is_using_ll_driver' function and makes the
      'struct hid_ll_driver' of the four most common transports accessible
      through hid.h.
      Signed-off-by: default avatarJason Gerecke <jason.gerecke@wacom.com>
      Acked-By: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      fc2237a7
  30. 08 Jun, 2017 1 commit
  31. 07 Jun, 2017 1 commit
  32. 29 May, 2017 1 commit
  33. 22 May, 2017 1 commit
  34. 21 Mar, 2017 1 commit
    • Benjamin Tissoires's avatar
      HID: remove initial reading of reports at connect · 9143059f
      Benjamin Tissoires authored
      It looks like a bunch of devices do not like to be polled
      for their reports at init time. When you look into the details,
      it seems that for those that are requiring the quirk
      HID_QUIRK_NO_INIT_REPORTS, the driver fails to retrieve part
      of the features/inputs while others (more generic) work.
      
      IMO, it should be acceptable to remove the need for the quirk
      in the general case. On the small amount of cases where
      we actually need to read the current values, the driver
      in charge (hid-mt or wacom) already retrieves the features
      manually.
      
      There are 2 cases where we might need to retrieve the reports at
      init:
      1. hiddev devices with specific use-space tool
      2. a device that would require the driver to fetch a specific
         feature/input at plug
      
      For case 2, I have seen this a few time on hid-multitouch. It
      is solved in hid-multitouch directly by fetching the feature.
      I hope it won't be too common and this can be solved on a per-case
      basis (crossing fingers).
      
      For case 1, we moved the implementation of HID_QUIRK_NO_INIT_REPORTS
      in hiddev. When somebody starts calling ioctls that needs an initial
      update, the hiddev device will fetch the initial state of the reports
      to mimic the current behavior. This adds a small amount of time during
      the first HIDIOCGUSAGE(S), but it should be acceptable in
      most cases. To keep the currently known broken devices, we have to
      keep around HID_QUIRK_NO_INIT_REPORTS, but the scope will only be
      for hiddev.
      
      Note that I don't think hidraw would be affected and I checked that
      the FF drivers that need to interact with the report fields are all
      using output reports, which are not initialized by
      usbhid_init_reports().
      
      NO_INIT_INPUT_REPORTS is then replaced by HID_QUIRK_NO_INIT_REPORTS:
      there is no point keeping it for just one device.
      Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
      9143059f
  35. 06 Mar, 2017 2 commits
  36. 11 Jan, 2017 1 commit