1. 03 12月, 2015 4 次提交
  2. 03 11月, 2015 2 次提交
  3. 21 10月, 2015 4 次提交
    • J
      HID: wacom: Expect 'touch_max' touches if HID_DG_CONTACTCOUNT not present · df707938
      Jason Gerecke 提交于
      When introduced in commit 1b5d514a, the check 'if (hid_data->cc_index >= 0)'
      in 'wacom_wac_finger_pre_report' was intended to switch where the driver
      got the expected number of contacts from: HID_DG_CONTACTCOUNT if the usage
      was present, or 'touch_max' otherwise. Unfortunately, an oversight worthy
      of a brown paper bag (specifically, that 'cc_index' could never be negative)
      meant that the latter 'else' clause would never be entered.
      
      The patch prior to this one introduced a way for 'cc_index' to be negative,
      but only if HID_DG_CONTACTCOUNT is present in some report _other_ than the
      one being processed. To ensure the 'else' clause is also entered for devices
      which don't have HID_DG_CONTACTCOUNT on _any_ report, we add the additional
      constraint that 'cc_report' be non-zero (which is true only if the usage is
      present in some report).
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      df707938
    • J
      HID: wacom: Tie cached HID_DG_CONTACTCOUNT indices to report ID · 499522c8
      Jason Gerecke 提交于
      The cached indicies 'cc_index' and 'cc_value_index' introduced in 1b5d514a
      are only valid for a single report ID. If a touchscreen has multiple
      reports with a HID_DG_CONTACTCOUNT usage, its possible that the values
      will not be correct for the report we're handling, resulting in an
      incorrect value for 'num_expected'. This has been observed with the Cintiq
      Companion 2.
      
      To address this, we store the ID of the report those indicies are valid
      for in a new  'cc_report' variable. Before using them to get the expected
      contact count, we first check if the ID of the report we're processing
      matches 'cc_report'. If it doesn't, we update the indicies to point to
      the HID_DG_CONTACTCOUNT usage of the current report (if it has one).
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      499522c8
    • J
      HID: wacom: Report full pressure range for Intuos, Cintiq 13HD Touch · 8d515fda
      Jason Gerecke 提交于
      The new Intuos tablets added in eda01dab and the Cintiq 13HD Touch added
      in b4bf2120 are capable of reporting 2048 levels of pressure. Although the
      kernel reports the correct range to userspace, an oversight has resulted
      in the driver ingoring the 11th pressure bit and only sending pressures
      of 0 through 1023.
      
      We could fix this issue by expanding the type check to include these
      devices, but it makes much more sense to just have the driver look at
      the device's maximum pressure when determining if it should read the
      11th bit.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Reviewed-by: NPing Cheng <pingc@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      8d515fda
    • J
      HID: wacom: Add support for Cintiq Companion 2 · f7acb55c
      Jason Gerecke 提交于
      Adds support for the EMR (pen+pad) and touchscreen devices used by the
      Wacom Cintiq Companion 2. This applies both to using the device as a
      standalone system, as well as when operating in "Cintiq mode" (where
      the EMR/touchscreen are simply exposed as USB devices to the system
      its connected to).
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NClifford Jolly <expiredpopsicle@gmail.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      f7acb55c
  4. 24 9月, 2015 2 次提交
  5. 29 8月, 2015 3 次提交
  6. 18 8月, 2015 1 次提交
  7. 11 8月, 2015 1 次提交
    • J
      HID: wacom: Simplify 'wacom_pl_irq' · 025bcc15
      Jason Gerecke 提交于
      Unlike other IRQ functions, 'wacom_pl_irq' uses the second element of
      the 'tool' array to store information about its single pen. This makes
      the function more difficult to understand (since it doesn't follow the
      general pattern of other IRQ functions) and prevents the possibility of
      refactoring how pen state is stored.
      
      This patch rewrites 'wacom_pl_irq' to follow the usual IRQ conventions,
      including storing tool type in 'tool[0]' and implicitly tracking prox
      with the 'id[0]' variable.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      025bcc15
  8. 04 8月, 2015 2 次提交
  9. 23 7月, 2015 3 次提交
  10. 13 7月, 2015 1 次提交
  11. 08 7月, 2015 1 次提交
  12. 18 6月, 2015 4 次提交
    • 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: Split apart 'wacom_setup_pentouch_input_capabilites' · 2636a3f2
      Jason Gerecke 提交于
      This splits the 'wacom_setup_pentouch_input_capabilites' function into
      pieces dedicated to doing setup for just the pen interface and just
      the touch interface. This makes it easier to focus on the relevant
      piece when making changes.
      
      This patch introduces no functional changes.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      2636a3f2
    • 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
  13. 20 5月, 2015 1 次提交
  14. 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
  15. 23 4月, 2015 3 次提交
  16. 02 4月, 2015 4 次提交
  17. 18 3月, 2015 1 次提交
  18. 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
  19. 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