1. 05 8月, 2016 5 次提交
  2. 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
  3. 05 4月, 2016 2 次提交
  4. 17 2月, 2016 5 次提交
  5. 28 12月, 2015 2 次提交
  6. 19 11月, 2015 1 次提交
  7. 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
  8. 03 11月, 2015 2 次提交
  9. 21 10月, 2015 1 次提交
  10. 24 9月, 2015 2 次提交
  11. 29 8月, 2015 1 次提交
  12. 11 8月, 2015 1 次提交
    • J
      HID: wacom: Report correct device resolution when using the wireless adapater · 0be01712
      Jason Gerecke 提交于
      The 'wacom_wireless_work' function does not recalculate the tablet's
      resolution, causing the value contained in the 'features' struct to
      always be reported to userspace. This value is valid only for the pen
      interface, meaning that the value will be incorrect for the touchpad (if
      present). This in particular causes problems for libinput which relies
      on the reported resolution being correct.
      
      This patch adds the necessary calls to recalculate the resolution for
      each interface. This requires a little bit of code shuffling since both
      the 'wacom_set_default_phy' and 'wacom_calculate_res' are declared below
      their new first point of use in 'wacom_wireless_work'.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      0be01712
  13. 10 8月, 2015 2 次提交
  14. 04 8月, 2015 3 次提交
  15. 23 7月, 2015 1 次提交
    • J
      HID: wacom: Perform all event processing as part of report processing · 06324e0c
      Jason Gerecke 提交于
      In some cases, we need access to information before it becomes available
      to the 'event' handler. In particular, for some devices we cannot properly
      process the finger data without first knowing the "contact count" at the
      very end of the report (e.g. the Cintiq 24HDT touch screen, when forced
      through the GENERIC codepath).
      
      Since the HID subsystem doesn't provide a way to take action before 'event'
      is called, we take a cue from hid-multitouch.c and add a pre-process step
      within the 'report' handler that performs the same function.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.com>
      06324e0c
  16. 17 7月, 2015 2 次提交
    • J
      HID: wacom: Set default device name to value from wacom->features · 2bdd163c
      Jason Gerecke 提交于
      Allocated input devices should not use the 'pen_name' by default since
      we do not know at that point in time if that is an appropriate choice
      of name. Instead, use the (tool-agnostic) name that is stored in the
      device's 'wacom_features' structure. This also has the nice side-effect
      of requring us to be explicit about the naming of the pen device, as
      we already are for touch and pad devices.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.com>
      2bdd163c
    • J
      HID: wacom: Properly free inputs if 'wacom_allocate_inputs' fails · d9f2d203
      Jason Gerecke 提交于
      The 'wacom_allocate_inputs' function tries to allocate three input devices: one
      each for the pen, touch, and pad. The pointers that are returned by the
      'wacom_allocate_input' calls are temporarily stored to local variables where
      they are checked to ensure they're non-null before storing them in the
      'wacom_wac' structure. If an allocation fails,  the 'wacom_free_inputs'
      function is called to reclaim the memory. Unfortunately, 'wacom_free_inputs' is
      called prior to the pointers being copied, so it is not actually able to free
      anything.
      
      This patch has the calls to 'wacom_allocate_input' store the pointer directly
      in the 'wacom_wac' structure where they can be freed. Also, it replaces the
      call to 'wacom_free_inputs' with the (more general) 'wacom_clean_inputs' and
      removes the no-longer-used function.
      
      [jkosina@suse.com: modify to resolve conflict with 67e123ff ("Delete
       unnecessary checks")]
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.com>
      d9f2d203
  17. 09 7月, 2015 1 次提交
  18. 26 6月, 2015 1 次提交
  19. 18 6月, 2015 5 次提交
    • 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
    • J
      HID: wacom: Simplify 'wacom_update_name' · 44b5250b
      Jason Gerecke 提交于
      A little bit of cleanup work for 'wacom_update_name' to make it easier on
      the eyes. Creates a temporary 'name' variable on which we'll perform our
      edits. Once the name is in its final form, it will be copied (with
      appropriate suffix) to 'wacom_wac->name' and 'wacom_wac->pad_name'.
      Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      44b5250b
  20. 22 5月, 2015 1 次提交