1. 27 1月, 2017 2 次提交
    • J
      HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface · 4922cd26
      Jason Gerecke 提交于
      In addition to its USB interface, the second-generation Intuos Pro
      includes a Bluetooth radio that offers two pairing interfaces: classic
      and low-energy. The classic interface functions just like the earlier
      Bluetooth-enabled Intuos4 and Graphire4 tablets, appearing as a HID device
      that our driver can work with. The low-energy interface is intented to
      be used by userspace applications that make use of its paper-to-digital
      capabilities.
      
      Despite the USB interface using Wacom's new vendor-defined HID usages,
      the Bluetooth interface provides us with useless black-box "blob"
      report descriptors like past devices. We thus have to explicitly add
      support for the PIDs and reports used.
      
      These devices pack a /lot/ of information into a single Bluetooth
      input report. Each report contains up to seven snapshots of the pen
      state, four snapshots of the touch state (of five touches each), pad
      state, and battery data. Thankfully this isn't too hard for the driver
      to report -- it just takes a fair amount of code to extract!
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      4922cd26
    • J
      HID: wacom: Move WAC_CMD_* into wacom_wac.h · 5ba13c64
      Jason Gerecke 提交于
      Centralize our definition of report IDs by moving those for device commands
      into wacom_wac.h alongside those for input reports.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5ba13c64
  2. 09 12月, 2016 1 次提交
  3. 20 10月, 2016 12 次提交
  4. 12 8月, 2016 1 次提交
    • J
      HID: wacom: Update last_slot_field during pre_report phase · 003f50ab
      Jason Gerecke 提交于
      If a touchscreen contains both multitouch and single-touch reports in its
      descriptor in that order, the driver may overwrite information it saved
      about the format of the multitouch report. This can cause the report
      processing code to get tripped up and send an incorrect event stream to
      userspace.
      
      In particular, this can cause last_slot_field to be overwritten with the
      result that the driver prematurely assumes it has finished processing a
      slot and sending the ABS_MT_SLOT event at the wrong point in time,
      associating events for the current contact with the following contact
      instead.
      
      To prevent this from occurring, we update the value of last_slot_field
      durring the pre_report phase to ensure that it is correct for the report
      that is to be processed.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      003f50ab
  5. 10 8月, 2016 1 次提交
  6. 05 8月, 2016 5 次提交
  7. 03 5月, 2016 1 次提交
    • J
      HID: wacom: Add fuzz factor to distance and tilt axes · bef7e200
      Jason Gerecke 提交于
      The fuzz present on the distance and tilt axes is noticable when a puck is
      present, and userspace (specifically libinput) would like the ability to
      filter out the noise. To facilitate this, we assign a fuzz value of '1'
      for the distance and tilt axes. This is large enough to cover most of the
      natural variation in distance value as the puck is moved around, and
      enough to cover the jitter in rotation (reported through tilt axes) when
      the puck is left alone.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      bef7e200
  8. 05 4月, 2016 1 次提交
  9. 08 1月, 2016 1 次提交
  10. 03 12月, 2015 1 次提交
  11. 03 11月, 2015 1 次提交
  12. 21 10月, 2015 2 次提交
  13. 24 9月, 2015 2 次提交
  14. 29 8月, 2015 2 次提交
  15. 04 8月, 2015 2 次提交
  16. 23 7月, 2015 1 次提交
  17. 18 6月, 2015 3 次提交
    • J
      HID: wacom: Introduce new 'touch_input' device · 2a6cdbdd
      Jason Gerecke 提交于
      Instead of having a single 'input_dev' device that will take either pen
      or touch data depending on the type of the device, create seperate devices
      devices for each. By splitting things like this, we can support devices
      (e.g. the I2C "AES" sensors in some newer tablet PCs) that send both pen
      and touch reports from a single endpoint.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2a6cdbdd
    • J
      HID: wacom: Introduce a new WACOM_DEVICETYPE_PAD device_type · 862cf553
      Jason Gerecke 提交于
      Historically, both the touch and pad tools would have shared the
      'BTN_TOOL_FINGER' type. Any time you needed to distinguish the two, you
      had to use some other bit of knowledge (e.g. that the pad was on the same
      interface as the pen, and thus 'touch_max' would be zero).
      
      To make these checks more readable, we introduce WACOM_DEVICETYPE_PAD.
      Although we still have to rely on other bits of knowledge to set this
      bit on the right interface (since it cannot be detected from the HID
      descriptor), it can be done just once inside 'wacom_setup_device_quirks'.
      
      This patch introduces no functional changes.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      862cf553
    • J
      HID: wacom: Treat features->device_type values as flags · aa86b18c
      Jason Gerecke 提交于
      The USB devices that this driver has historically supported segregate the
      pen and touch portions of the tablet. Oftentimes the segregation would be
      done at the interface level, though on occasion (e.g. Cintiq 24HDT) the
      tablet would combine two totally independent USB devices behind an internal
      USB hub. Because pen and touch never shared the same interface, it made
      sense for the 'device_type' to store a single value: "pen" or "touch".
      
      Recently, however, some I2C devices have been created which combine the
      two. A first step to accomodating this is to expand 'device_type' so that
      it can represent two (or potentially more) types simultaneously. To do
      this, we treat it as a bitfield and set/check individual bits rather
      than using the '=' and '==' operators.
      
      This should not result in any functional change since no supported devices
      (that I'm aware of, at least) have HID descriptors that indicate both
      pen and touch reports on a single interface.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      aa86b18c
  18. 04 5月, 2015 1 次提交
    • J
      HID: wacom: Discover device_type from HID descriptor for all devices · 042628ab
      Jason Gerecke 提交于
      Currently, we assume a device_type of BTN_TOOL_PEN before scanning the
      HID descriptor and then change the device_type if what we discover
      proves that assumption wrong. This way of doing things makes it more
      difficult to figure out if a device (particularly a HID_GENERIC device)
      actually does tablet/touch input or is something completley different.
      
      This patch leaves device_type at its initial value of 0 and then calls
      'wacom_parse_hid' for every device (not just those that have touch).
      As we map the usages, we can set the device_type as before. After we're
      finished, we can then check if the value is still zero and do whatever
      is most appropriate.
      
      Detecting the pen can be a little tricky on most Wacom devices because
      the descriptors describe opaque blobs. Fortunately, older Wacom tablets
      have the HID_DG_DIGITIZER usage on the pen's application collection and
      newer tablets seem to have a similar vendor-defined usage that we can
      trigger on.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      042628ab