1. 18 6月, 2015 2 次提交
    • 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
  2. 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
  3. 23 4月, 2015 3 次提交
  4. 02 4月, 2015 4 次提交
  5. 18 3月, 2015 1 次提交
  6. 17 3月, 2015 1 次提交
    • B
      HID: wacom: ask for a in-prox report when it was missed · 5fcad167
      Benjamin Tissoires 提交于
      If noone listens to the input device when a tool comes in proximity,
      the tablet does not send the in-prox event when a client becomes available.
      That means that no events will be sent until the tool is taken out of
      proximity.
      
      In this situation, ask for the report WACOM_REPORT_INTUOSREAD which will
      read the corresponding feature and generate an in-prox event.
      To make some generation of hardware working, we need to unset the
      quirk NO_GET set by hid-core because the interfaces are seen as "boot
      mouse".
      
      We don't schedule this read in a worker while we are in an IO interrupt.
      We know that usbhid will do it asynchronously. If this is triggered by
      uhid, then this is obviously a client side bug :)
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: NJason Gerecke <killertofu@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      5fcad167
  7. 12 3月, 2015 1 次提交
    • J
      HID: wacom: Add battery presence indicator to wireless tablets · 71fa641e
      Jason Gerecke 提交于
      Declare the POWER_SUPPLY_PROP_PRESENT property to provide userspace
      with a way to determine if the battery on a wireless tablet is plugged
      in. Although current wireless tablets do not explicitly report this
      information, it can be inferred from other state information. In
      particular, a battery is assumed to be present if any of the following
      are true: a non-zero battery level reported, the battery is reported as
      charging, or the tablet is operating wirelessly.
      
      Note: The last condition above may not strictly hold for the Graphire
      Wireless (it charges from a DC barrel jack instead of a USB port), but I
      do not know what is reported in the no-battery condition.
      Signed-off-by: NJason Gerecke <killertofu@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      71fa641e
  8. 11 3月, 2015 5 次提交
  9. 03 3月, 2015 2 次提交
  10. 27 2月, 2015 1 次提交
    • B
      HID: wacom: add full support of the Wacom Bamboo PAD · 8c97a765
      Benjamin Tissoires 提交于
      The stylus of this device works just fine out of the box.
      The touch is seen by default as a mouse with relative events and some
      gestures.
      The wireless and the wired version have slightly different firmwares, but
      the debug mode 2 on the feature 2 is common to the 2 devices. In this mode,
      all the reports are emitted through the debug interface (pen, raw touch
      and mouse emulation), so we have to re-route manually the events.
      
      We keep the Pen interface as a HID_GENERIC one because it works, and only
      parse the raw touches while discarding the mouse emulation & gestures.
      
      Switching the default in raw mode allows us to have a consistent user
      experience accross all the multitouch touchpads (and enable the touch part
      of the devices).
      
      Note that the buttons of this devices are reported through the touch
      interface. There is no 'Pad' interface. It seemed more natural to have
      the BTN_LEFT and BTN_RIGHT reported with the touch because they are
      placed under the touch interface and it looks like they belong to the
      touch part.
      Tested-by: NJosep Sanchez Ferreres <josep.sanchez.ferreres@est.fib.upc.edu>
      Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
      Acked-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8c97a765
  11. 24 2月, 2015 1 次提交
  12. 19 2月, 2015 1 次提交
  13. 12 2月, 2015 1 次提交
  14. 29 1月, 2015 3 次提交
  15. 23 1月, 2015 1 次提交
  16. 12 1月, 2015 2 次提交
  17. 06 1月, 2015 1 次提交
  18. 12 12月, 2014 1 次提交
  19. 10 12月, 2014 1 次提交
  20. 06 12月, 2014 2 次提交
  21. 02 12月, 2014 2 次提交
  22. 27 11月, 2014 1 次提交
  23. 22 11月, 2014 2 次提交
    • J
      HID: wacom: Add angular resolution data to some ABS axes · 26fe4124
      Jason Gerecke 提交于
      Provide the resolution of several angular axes (tilt, pen rotation, puck
      rotation) to userspace. Because these values are natively degree-based, we
      need to convert them to into units/radian as required by the input_absinfo
      struct. To ensure wraparound behaves properly for the rotation axes, the
      converted value was rounded up rather than rounded nearest.
      
      Notably, the touchring axes (ABS_WHEEL and ABS_THROTTLE) are left without a
      a declared resolution because the their low resolution cannot be accurately
      represented (the worst-case rounding-induced error would be ~16 degrees).
      Pre-scaling the values and range by at least 10x would reduce the error in
      the resolution to acceptable levels, but the xf86-input-wacom driver is not
      able to use pre-scaled values for these axes at this time.
      Signed-off-by: NJason Gerecke <killertofu@gmail.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      26fe4124
    • J
      HID: wacom: Report ABS_TILT_{X,Y} as signed values · ec5fc1c1
      Jason Gerecke 提交于
      Centers the ABS_TILT_{X,Y} axes so that a value of zero is reported when
      the pen is vertical. Combined with resolution information in the next
      patch, this makes it possible for userspace to calculate the pen angle
      without needing hardware-specific knowledge. The xf86-input-wacom driver
      was updated to support signed tilt values in late-2012 (2f2acec).
      Signed-off-by: NJason Gerecke <killertofu@gmail.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      ec5fc1c1