- 07 11月, 2019 1 次提交
-
-
由 Jason Gerecke 提交于
The HID descriptors for most Wacom devices oddly declare the serial number and other related fields as signed integers. When these numbers are ingested by the HID subsystem, they are automatically sign-extended into 32-bit integers. We treat the fields as unsigned elsewhere in the kernel and userspace, however, so this sign-extension causes problems. In particular, the sign-extended tool ID sent to userspace as ABS_MISC does not properly match unsigned IDs used by xf86-input-wacom and libwacom. We introduce a function 'wacom_s32tou' that can undo the automatic sign extension performed by 'hid_snto32'. We call this function when processing the serial number and related fields to ensure that we are dealing with and reporting the unsigned form. We opt to use this method rather than adding a descriptor fixup in 'wacom_hid_usage_quirk' since it should be more robust in the face of future devices. Ref: https://github.com/linuxwacom/input-wacom/issues/134 Fixes: f85c9dc6 ("HID: wacom: generic: Support tool ID and additional tool types") CC: <stable@vger.kernel.org> # v4.10+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 05 9月, 2019 1 次提交
-
-
由 Ping Cheng 提交于
wacom_wac_pad_event is the only routine we need to update. Signed-off-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 8月, 2019 3 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Some Wacom devices have keys with predefined meanings. However, when support was originally added for these devices, the codes for these keys were not available yet. These keys were thus reported with the numbered KEY_PROG* range. Some missing key codes were added with commit 4eb220cb ("HID: wacom: generic: add 3 tablet touch keys") and we are now able to report the proper key codes. We continue to report the original KEY_PROG codes so as not to break any unknown applications that may depend on them. Also, to support the touch key, track its state in the pad report. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Link: https://gitlab.freedesktop.org/libinput/libinput/merge_requests/155 Link: https://github.com/linuxwacom/xf86-input-wacom/pull/46Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jason Gerecke 提交于
Addresses a few issues that were noticed when compiling with non-default warnings enabled. The trimmed-down warnings in the order they are fixed below are: * declaration of 'size' shadows a parameter * '%s' directive output may be truncated writing up to 5 bytes into a region of size between 1 and 64 * pointer targets in initialization of 'char *' from 'unsigned char *' differ in signedness * left shift of negative value Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
The EKR ring claims a range of 0 to 71 but actually reports values 1 to 72. The ring is used in relative mode so this change should not affect users. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Fixes: 72b236d6 ("HID: wacom: Add support for Express Key Remote.") Cc: <stable@vger.kernel.org> # v4.3+ Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 8月, 2019 1 次提交
-
-
由 Jason Gerecke 提交于
Distance values reported by 2nd-gen Intuos tablets are on an inverted scale (0 == far, 63 == near). We need to change them over to a normal scale before reporting to userspace or else userspace drivers and applications can get confused. Ref: https://github.com/linuxwacom/input-wacom/issues/98 Fixes: eda01dab ("HID: wacom: Add four new Intuos devices") Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Cc: <stable@vger.kernel.org> # v4.4+ Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 8月, 2019 1 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Merge commit 74acee30 ("Merge branches 'for-5.2/fixes', 'for-5.3/doc', 'for-5.3/ish', 'for-5.3/logitech' and 'for-5.3/wacom' into for-linus") inadvertently dropped this change from commit 912c6aa6 ("HID: wacom: Add 2nd gen Intuos Pro Small support"). Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 05 8月, 2019 1 次提交
-
-
由 Aaron Armstrong Skomra 提交于
The bit indicating BTN_6 on this device is overshifted by 2 bits, resulting in the incorrect button being reported. Also fix copy-paste mistake in comments. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Link: https://github.com/linuxwacom/xf86-input-wacom/issues/71 Fixes: c7f0522a ("HID: wacom: Slim down wacom_intuos_pad processing") Cc: <stable@vger.kernel.org> # v4.5+ Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 02 7月, 2019 1 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Add the product ID for the 2nd Generation Intuos Pro Small to the touchring coordinate adjustment block. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
- 26 6月, 2019 1 次提交
-
-
由 Ping Cheng 提交于
Add product ID for new MobileStudio Pro. Signed-off-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 13 6月, 2019 4 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Bluetooth connections may contain more than one set of touches, or a partial set of touches, in one report. Set the number of expected touches when reading a collection instead of once per report (in the pre-report function). Accordingly, reset the number of touches expected after each sync. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Finger data is separated into chunks in our Bluetooth report, where each report contains the same number of chunks. Those chunks are not aligned in any particular way to a set of finger touches. That is, the first half of a group of simultaneous touches may be in one chunk at the end of a report and the second half could be at the beginning of the next report. Also some chunks contain no data and potentially some chunks could contain leftover (bad) data. Introduce and process the WACOM_HID_WT_REPORT_VALID usage that the device uses to let us know if we should process a chunk of data. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
In the generic code path, HID_DG_CONTACTMAX was previously only read from the second byte of report 0x23. Another report (0x82) has the HID_DG_CONTACTMAX in the higher nibble of the third byte. We should support reading the value of HID_DG_CONTACTMAX no matter what report we are reading or which position that value is in. To do this we submit the feature report as a event report using hid_report_raw_event(). Our modified finger event path records the value of HID_DG_CONTACTMAX when it sees that usage. Fixes: 8ffffd52 ("HID: wacom: fix timeout on probe for some wacoms") Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
The existing INTUOSP2_BT device class supports LEDs and this device does not. A new device class enum entry, "INTUOSP2S_BT", is created to avoid the INTUOSP2_BT LED code. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 31 5月, 2019 1 次提交
-
-
由 Thomas Gleixner 提交于
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license as published by the free software foundation either version 2 of the license or at your option any later version extracted by the scancode license scanner the SPDX license identifier GPL-2.0-or-later has been chosen to replace the boilerplate/reference in 3029 file(s). Signed-off-by: NThomas Gleixner <tglx@linutronix.de> Reviewed-by: NAllison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 18 5月, 2019 3 次提交
-
-
由 Jason Gerecke 提交于
The Bluetooth interface of the 2nd-gen Intuos Pro batches together four independent "frames" of finger data into a single report. Each frame is essentially equivalent to a single USB report, with the up-to-10 fingers worth of information being spread across two frames. At the moment the driver only calls `input_sync` after processing all four frames have been processed, which can result in the driver sending multiple updates for a single slot within the same SYN_REPORT. This can confuse userspace, so modify the driver to sync more often if necessary (i.e., after reporting the state of all fingers). Fixes: 4922cd26 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: <stable@vger.kernel.org> # 4.11+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
由 Jason Gerecke 提交于
The button numbering of the 2nd-gen Intuos Pro is not consistent between the USB and Bluetooth interfaces. Over USB, the HID_GENERIC codepath enumerates the eight ExpressKeys first (BTN_0 - BTN_7) followed by the center modeswitch button (BTN_8). The Bluetooth codepath, however, has the center modeswitch button as BTN_0 and the the eight ExpressKeys as BTN_1 - BTN_8. To ensure userspace button mappings do not change depending on how the tablet is connected, modify the Bluetooth codepath to report buttons in the same order as USB. To ensure the mode switch LED continues to toggle in response to the mode switch button, the `wacom_is_led_toggled` function also requires a small update. Link: https://github.com/linuxwacom/input-wacom/pull/79 Fixes: 4922cd26 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: <stable@vger.kernel.org> # 4.11+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Skomra <aaron.skomra@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
由 Jason Gerecke 提交于
The Bluetooth reports from the 2nd-gen Intuos Pro have separate bits for indicating if the tip or eraser is in contact with the tablet. At the moment, only the tip contact bit controls the state of the BTN_TOUCH event. This prevents the eraser from working as expected. This commit changes the driver to send BTN_TOUCH whenever either the tip or eraser contact bit is set. Fixes: 4922cd26 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: <stable@vger.kernel.org> # 4.11+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Skomra <aaron.skomra@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
- 17 5月, 2019 5 次提交
-
-
由 Jason Gerecke 提交于
If the tool spends some time in prox before entering range, a series of events (e.g. ABS_DISTANCE, MSC_SERIAL) can be sent before we or userspace have any clue about the pen whose data is being reported. We need to hold off on reporting anything until the pen has entered range. Since we still want to report events that occur "in prox" after the pen has *left* range we use 'wacom-tool[0]' as the indicator that the pen did at one point enter range and provide us/userspace with tool type and serial number information. Fixes: a48324de ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range") Cc: <stable@vger.kernel.org> # 4.11+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
由 Jason Gerecke 提交于
The serial number and tool type information that is reported by the tablet while a pen is merely "in prox" instead of fully "in range" can be stale and cause us to report incorrect tool information. Serial number, tool type, and other information is only valid once the pen comes fully in range so we should be careful to not use this information until that point. In particular, this issue may cause the driver to incorectly report BTN_TOOL_RUBBER after switching from the eraser tool back to the pen. Fixes: a48324de ("HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/range") Cc: <stable@vger.kernel.org> # 4.11+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
由 Aaron Armstrong Skomra 提交于
This affects the 2nd-gen Intuos Pro Medium and Large when using their Bluetooth connection. Fixes: 4922cd26 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: <stable@vger.kernel.org> # v4.11+ Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Only sync the pad once per report, not once per collection. Also avoid syncing the pad on battery reports. Fixes: f8b6a747 ("HID: wacom: generic: Support multiple tools per report") Cc: <stable@vger.kernel.org> # v4.17+ Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Currently, the driver will attempt to set the mode on all devices with a center button, but some devices with a center button lack LEDs, and attempting to set the LEDs on devices without LEDs results in the kernel error message of the form: "leds input8::wacom-0.1: Setting an LED's brightness failed (-32)" This is because the generic codepath erroneously assumes that the BUTTON_CENTER usage indicates that the device has LEDs, the previously ignored TOUCH_RING_SETTING usage is a more accurate indication of the existence of LEDs on the device. Fixes: 10c55cac ("HID: wacom: generic: support LEDs") Cc: <stable@vger.kernel.org> # v4.11+ Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 21 2月, 2019 1 次提交
-
-
由 Jason Gerecke 提交于
Wacom has introduced a new pen compatible with its MobileStudio Pro and other tablets. Although adding it to the tool ID tablet is not strictly necessary unrecognized pens are reported as BTN_TOOL_PEN already, unless the tablet sends the "eraser" bit, when BTN_TOOL_RUBBER is used instead), we'll keep it updated anyway. Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
- 15 2月, 2019 1 次提交
-
-
由 Gustavo A. R. Silva 提交于
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. This patch fixes the following warning: drivers/hid/wacom_wac.c: In function ‘wacom_setup_pen_input_capabilities’: drivers/hid/wacom_wac.c:3506:3: warning: this statement may fall through [-Wimplicit-fallthrough=] __clear_bit(ABS_MISC, input_dev->absbit); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/hid/wacom_wac.c:3508:2: note: here case WACOM_MO: ^~~~ Warning level 3 was used: -Wimplicit-fallthrough=3 This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough. Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 29 1月, 2019 1 次提交
-
-
由 Jason Gerecke 提交于
The 'wacom_hid_usage_quirk' function is the intended home for fixing up descriptors that are buggy or that don't quite fit the mold. Commit 57832512 was supposed to move all of these quirks but it missed the code to handle fixup the serial number usages for AES pens. Lets move this code out of 'wacom_wac_pen_usage_mapping' where it was previously lurking and put it into the same place as the others. Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com>
-
- 11 10月, 2018 1 次提交
-
-
由 Jason Gerecke 提交于
The DTK-2451 and DTH-2452 have a buggy HID descriptor which incorrectly contains a Cintiq-like report, complete with pen tilt, rotation, twist, serial number, etc. The hardware doesn't actually support this data but our driver duitifully sets up the device as though it does. To ensure userspace has a correct view of devices without updated firmware, we clean up this incorrect data in wacom_setup_device_quirks. We're also careful to clear the WACOM_QUIRK_TOOLSERIAL flag since its presence causes the driver to wait for serial number information (via wacom_wac_pen_serial_enforce) that never comes, resulting in the pen being non-responsive. Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Fixes: 83417206 ("HID: wacom: Queue events with missing type/serial data for later processing") Cc: stable@vger.kernel.org # v4.16+ Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 03 7月, 2018 2 次提交
-
-
由 Jason Gerecke 提交于
The touch sensors on the 2nd-gen Intuos tablets don't use a 4096x4096 sensor like other similar tablets (3rd-gen Bamboo, Intuos5, etc.). The incorrect maximum XY values don't normally affect userspace since touch input from these devices is typically relative rather than absolute. It does, however, cause problems when absolute distances need to be measured, e.g. for gesture recognition. Since the resolution of the touch sensor on these devices is 10 units / mm (versus 100 for the pen sensor), the proper maximum values can be calculated by simply dividing by 10. Fixes: b5fd2a3e ("Input: wacom - add support for three new Intuos devices") Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jason Gerecke 提交于
Detecting the number of supported touches for a particular device used to be tricky, both because early forms of the driver didn't have a very good HID parser and because early hardware didn't always advertise the actual number. At the time, we added a block of code which would ensure that touch_max would always be equal to at least 1 on any touch device, and relied on setting touch_max to e.g. 2 only for the multitouch-capable exceptions. The common case has since flipped, and the driver and descriptors can reliably detect the number of touches supported by modern sensors. Because of this, it makes sense to remove the fixup code and instead place static declarations of "touch_max = 1" for these old devices. It isn't entirely clear if all 2-finger devices actually report a maximum number of touches so we leave these declarations still in place. For the eagle-eyed, the "> BAMBOO_PT" condition was originally equivalent to ">= TABLETPC", which is what the intent was. This commit doesn't have to consider the types introduced in the interim since they shouldn't be affected, hence why only the tablet PC definitions have been modified. Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 22 5月, 2018 1 次提交
-
-
由 Jason Gerecke 提交于
The 1st-generation Intuos tablets (CTL-X80) include an "in range" flag like some professional tablets. To ensure the pen remains usable at as large as distance as possible (and to preemptively disable touch when it is nearby) we need to ensure that we handle these "in range" events. Handling of tool type identification has been moved to occur only when the pen is fully in prox rather than any time the "stylus_in_proximity" flag changes (which is controlled by the further-out "in range" flag). Link: https://sourceforge.net/p/linuxwacom/bugs/358/ Link: https://github.com/linuxwacom/xf86-input-wacom/issues/14 Link: https://github.com/linuxwacom/xf86-input-wacom/issues/17Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Tested-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 12 4月, 2018 1 次提交
-
-
由 Aaron Armstrong Skomra 提交于
The code path for recent Bluetooth devices omits an exit report which resets all the values of the device. Fixes: 4922cd26 ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface") Cc: <stable@vger.kernel.org> # 4.11 Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 07 3月, 2018 4 次提交
-
-
由 Jiri Kosina 提交于
... and therefore should be static. Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Wacom Bluetooth reports contain multiple pen frames per report. Each frame contains a flag indicating if the frame is valid. Future Wacom devices with this type of report may contain HID descriptors, add support for this usage to the generic codepath of the Wacom driver. Signed-off-by: NAaron Armstrong Skomra <skomra@gmail.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Some Wacom devices contain contain Pen and Pad usages in the same report. Future devices of this type may utilize HID Descriptors. The generic code path of the Wacom driver previously assumed pen, touch, and pad reports were delivered in separate reports. This patch adds support for processing each collection of a report separately, in order to support reports with multiple tools. Signed-off-by: NAaron Armstrong Skomra <skomra@gmail.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Use the code path that predates generic device support. Signed-off-by: NAaron Armstrong Skomra <skomra@gmail.com> Reviewed-by: NPing Cheng <ping.cheng@wacom.com> Reviewed-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 23 1月, 2018 2 次提交
-
-
由 Jason Gerecke 提交于
Adds support for the second-generation "One by Wacom" tablets. These devices are similar to the last generation, but a slightly different size and reporting a higher number of pressure levels. Signed-off-by: NMx Jing <jingmingxuan@outlook.com> Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jason Gerecke 提交于
Touch toggle softkeys send a '1' while pressed and a '0' while released, requring the kernel to keep track of wether touch should be enabled or disabled. The code does not handle the state transitions properly, however. If the key is pressed repeatedly, the following four states of states are cycled through (assuming touch starts out enabled): Press: shared->is_touch_on => 0, SW_MUTE_DEVICE => 1 Release: shared->is_touch_on => 0, SW_MUTE_DEVICE => 1 Press: shared->is_touch_on => 1, SW_MUTE_DEVICE => 0 Release: shared->is_touch_on => 1, SW_MUTE_DEVICE => 1 The hardware always properly enables/disables touch when the key is pressed but applications that listen for SW_MUTE_DEVICE events to provide feedback about the state will only ever show touch as being enabled while the key is held, and only every-other time. This sequence occurs because the fallthrough WACOM_HID_WD_TOUCHONOFF case is always handled, and it uses the value of the *local* is_touch_on variable as the value to report to userspace. The local value is equal to the shared value when the button is pressed, but equal to zero when the button is released. Reporting the shared value to userspace fixes this problem, but the fallthrough case needs to update the shared value in an incompatible way (which is why the local variable was introduced in the first place). To work around this, we just handle both cases in a single block of code and update the shared variable as appropriate. Fixes: d793ff81 ("HID: wacom: generic: support touch on/off softkey") Cc: <stable@vger.kernel.org> # v4.12+ Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NAaron Skomra <aaron.skomra@wacom.com> Tested-by: NAaron Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 21 11月, 2017 2 次提交
-
-
由 Jason Gerecke 提交于
Userspace expects to receive tool type and serial number information for the active pen in the very first kernel report, if such data is supported by the hardware. While this expectation is not an issue for EMR devices, AES sensors will often send several packets worth of in- range data before relaying type/serial data to the kernel. Sending this data "late" can result in proximity-tracking issues by xf86-input-wacom, or an inability to distinguish different pens by input-wacom. Options for dealing with this situation include ignoring reports from the tablet until we get the necessary data, or using the information from the last-seen pen instead of the (eventual) real data. Neither option is particularly attractive: the former results in truncated strokes and the latter causes issues with switching between pens. This commit instead opts to queue up events with missing information until we receive a report which contains it. At that point, we can update the driver's state variables (id[0] and serial[0]) and replay the queued events. Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Jason Gerecke 提交于
Current AES sensors relay tool type and serial number information with a different set of usages than those prescribed by the modern (i.e. MobileStudio Pro and newer) EMR tablet standard. To ensure the driver properly understands these usages, we modify them to be compatible. The identifying information is split across three consecutive fields: a 16-bit WACOM_HID_WT_SERIALNUMBER (which is more accurately described as WACOM_HID_WD_TOOLTYPE), a 32-bit HID_DG_TOOLSERIALNUMBER, and an 8-bit 0xFF000000 (which should be WACOM_HID_WD_SERIALHI). While we're at it, we also define proper min/max values since may may be undefined on some devices. Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 09 11月, 2017 1 次提交
-
-
由 Jason Gerecke 提交于
The Wacom Pro Pen 3D includes a third barrel switch which is intended to be particularly useful in applications where one frequency uses pan, zoom, and rotate to navigate around a scene or model. The pen is compatible with the MobileStudio Pro, 2nd-gen Intuos Pro, and Cintiq Pro. When the third button is pressed, these devices set both the HID_DG_BARRELSWITCH and HID_DG_BARRELSWITCH2 usages since their HID descriptors do not include a usage specific to the button. Rather than send both BTN_STYLUS and BTN_STYLUS2 when the third button is pressed, userspace (libinput) has requested that we detect this condition and report a newly-defined BTN_STYLUS3 event instead. We could define a quirk specific to devices compatible with the Pro Pen 3D, but the liklihood of seeing both barrel switch bits set with other pens/devices is low enough to not worry about (pens mechanically prevent accidental activation of multiple switches). Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Acked-by: NDmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: NPeter Hutterer <peter.hutterer@who-t.net> Acked-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-