1. 08 1月, 2016 1 次提交
  2. 31 12月, 2015 1 次提交
    • M
      HID: i2c-hid: Prevent sending reports from racing with device reset · 9a327405
      Mika Westerberg 提交于
      When an i2c-hid device is resumed from system sleep the driver resets
      the device to be sure it is in known state. The device is expected to
      issue an interrupt when reset is complete.
      
      This reset might take few milliseconds to complete so if the HID driver
      on top (hid-rmi) starts to set up the device by sending feature reports
      etc. the device might not issue the reset complete interrupt anymore.
      
      Below is what happens to touchpad on Lenovo Yoga 900 during resume from
      system sleep:
      
        [   24.790951] i2c_hid i2c-SYNA2B29:00: i2c_hid_hwreset
        [   24.790973] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_power
        [   24.790982] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=22 00 00 08
        [   24.793011] i2c_hid i2c-SYNA2B29:00: resetting...
        [   24.793016] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=22 00 00 01
      
      Here i2c-hid sends reset command to the touchpad.
      
        [   24.794012] i2c_hid i2c-SYNA2B29:00: input: 06 00 01 00 00 00
        [   24.794051] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_or_send_report
        [   24.794059] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command:
                       cmd=22 00 3f 03 0f 23 00 04 00 0f 01
      
      Now hid-rmi puts the touchpad to correct mode by sending it a feature
      report. This makes the touchpad not to issue reset complete interrupt.
      
        [   24.796092] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: waiting...
      
      i2c-hid starts to wait for the reset interrupt to trigger which never
      happens.
      
        [   24.798304] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_or_send_report
        [   24.798313] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command:
                       cmd=25 00 17 00 09 01 42 00 2e 00 19 19 00 10 cc 06 74 04 0f
                           19 00 00 00 00 00
      
      Yet another output report from hid-rmi driver.
      
        [   29.795630] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: finished.
        [   29.795637] i2c_hid i2c-SYNA2B29:00: failed to reset device.
      
      After 5 seconds i2c-hid driver times out.
      
        [   29.795642] i2c_hid i2c-SYNA2B29:00: i2c_hid_set_power
        [   29.795649] i2c_hid i2c-SYNA2B29:00: __i2c_hid_command: cmd=22 00 01 08
        [   29.797576] dpm_run_callback(): i2c_hid_resume+0x0/0xb0 returns -61
        [   29.797584] PM: Device i2c-SYNA2B29:00 failed to resume: error -61
      
      After this the touchpad does not work anymore (and also resume itself
      gets slowed down because of the timeout).
      
      Prevent sending of feature/output reports while the device is being
      reset by adding a mutex which is held during that time.
      Reported-and-tested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Reported-by: NNish Aravamudan <nish.aravamudan@gmail.com>
      Suggested-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      9a327405
  3. 02 12月, 2015 1 次提交
  4. 20 11月, 2015 1 次提交
  5. 17 11月, 2015 1 次提交
  6. 13 11月, 2015 1 次提交
  7. 07 11月, 2015 2 次提交
  8. 06 11月, 2015 2 次提交
  9. 05 11月, 2015 1 次提交
    • J
      HID: wacom: Call 'wacom_query_tablet_data' only after 'hid_hw_start' · 86e88f0e
      Jason Gerecke 提交于
      When connecting the Cintiq Companion 2 as an external tablet (i.e., using
      it in "hybrid" mode) it has been seen to cause the kernel of the machine
      it is connected to to Oops. The cause has been traced to us attempting to
      switch the tablet's mode prior to actually starting HID device (resulting
      in the eventual dereference of the uninitialized control URB).
      
      Commit 3b164a00 moved the mode switch from occuring post-start to occurring
      pre-start. The change was not seen to cause issues largely due to the fact
      that most devices mode switch with 'hid_hw_raw_request' (which is safe to
      call prior to start) rather than 'hid_hw_request'.
      
      Moving the call back to its original location resolves the issue, but
      causes some touch-only Bamboo tablets (e.g. 056a:00d0) to stop working.
      The affected tablets require us to perform a mode switch on their
      vestigial pen interface prior ignoring with -ENODEV, meaning that the
      code which is responsible for doing the ignoring has to move as well.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      86e88f0e
  10. 03 11月, 2015 3 次提交
  11. 26 10月, 2015 1 次提交
  12. 21 10月, 2015 5 次提交
  13. 12 10月, 2015 1 次提交
    • M
      HID: multitouch: Fetch feature reports on demand for Win8 devices · 6d4f5440
      Mika Westerberg 提交于
      Some newer Intel Skylake based Dell laptops with Win8 precision touchpad
      fail when initial feature reports are fetched from it. Below is an example
      output with some additional debug included:
      
       i2c_hid i2c-DLL0704:01: Fetching the HID descriptor
       i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=20 00
       i2c_hid i2c-DLL0704:01: HID Descriptor: 1e 00 00 01 99 02 21 00 24 ...
       ...
       i2c_hid i2c-DLL0704:01: i2c_hid_get_report
       i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 38 02 23 00
       i2c_hid i2c-DLL0704:01: report (len=4): 04 00 08 05
       i2c_hid i2c-DLL0704:01: report id 13
       i2c_hid i2c-DLL0704:01: i2c_hid_get_report
       i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 3d 02 23 00
       i2c_hid i2c-DLL0704:01: failed to retrieve report from device.
       i2c_hid i2c-DLL0704:01: report id 7
       i2c_hid i2c-DLL0704:01: i2c_hid_get_report
       i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 37 02 23 00
       i2c_hid i2c-DLL0704:01: report (len=259): 03 01 07 fc 28 fe 84 40 ...
       i2c_hid i2c-DLL0704:01: report id 4
       i2c_hid i2c-DLL0704:01: i2c_hid_get_report
       i2c_hid i2c-DLL0704:01: __i2c_hid_command: cmd=22 00 34 02 23 00
      
      We manage to fetch few reports but then the touchpad dies:
      
       i2c_designware i2c_designware.1: i2c_dw_handle_tx_abort: lost arbitration
       i2c_hid i2c-DLL0704:01: failed to retrieve report from device.
      
      it eventually pulls the whole I2C bus low:
      
       i2c_designware i2c_designware.1: controller timed out
       i2c_hid i2c-DLL0704:01: failed to set a report to device.
      
      Fix this by preventing initial feature report retrieval for Win8 devices.
      Instead we fetch reports as needed in mt_feature_mapping(). This prevents
      fetching reports which might cause problems with the device in question.
      Suggested-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NMika Westerberg <mika.westerberg@linux.intel.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Tested-by: NSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      6d4f5440
  14. 06 10月, 2015 1 次提交
    • R
      HID: sensor-hub: Add quirk for Lenovo Yoga 2 with ITE Chips · e8e88438
      Ritesh Raj Sarraf 提交于
      This patch is a follow-up to 47eeca8a48 (" HID: sensor-hub: Add in quirk
      for Lenovo Yogas with ITE")
      
      The Lenovo Yoga 2 13 seems to be sold in multiple variants with minor
      difference3s. IN my case, the USB ID for ITE chip is different than the
      Yoga 2 11 and Yoga 3 14.
      
      Without the quirk, no data is received from the accelerometer. I have
      verified the patch, testing this on 4.3-rc4 (and 4.2 stable). With this
      patch, proper orientation data is received.
      
      rrs@learner:~/Community/UpstreamSources/linux-upstream_GIT (stable-42)$
      monitor-sensor
      ** Message: Accelerometer orientation changed: bottom-up
      ** Message: Light changed: 0.000000 (lux)
      ±** Message: Accelerometer orientation changed: left-up
      ** Message: Accelerometer orientation changed: bottom-up
      ** Message: Accelerometer orientation changed: left-up
      ** Message: Accelerometer orientation changed: normal
      ** Message: Light changed: 29.999999 (lux)
      
      monitor-sensor can be found in the iio-sensor-proxy tool.
      Signed-off-by: NRitesh Raj Sarraf <rrs@debian.org>
      Acked-by: NSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      e8e88438
  15. 05 10月, 2015 1 次提交
  16. 01 10月, 2015 2 次提交
  17. 30 9月, 2015 1 次提交
  18. 29 9月, 2015 2 次提交
  19. 24 9月, 2015 2 次提交
  20. 23 9月, 2015 3 次提交
  21. 04 9月, 2015 5 次提交
  22. 29 8月, 2015 2 次提交