- 27 7月, 2017 1 次提交
-
-
由 Jason Gerecke 提交于
The 'wacom_update_name' function is responsible for producing names for the input device nodes based on the hardware device name. Commit f2209d4a added the ability to strip off prefixes like "Wacom Co.,Ltd." where the prefix was immediately (and redundantly) followed by "Wacom". The 2nd-generation Intuos Pro 2 has such a prefix, but with a small error (the period and comma are swapped) that prevents the existing code from matching it. We're loath to extend the number of cases out endlessly and so instead try to be smarter about name generation. We observe that the cause of the redundant prefixes is HID combining the manufacturer and product strings of USB devices together. By using the original product name (with "Wacom" prefixed, if it does not already exist in the string) we can bypass the gyrations to find and remove redundant prefixes. Other devices either don't have a manufacturer string that needs to be removed (Bluetooth, uhid) or should have their name generated from scratch (I2C). Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Acked-By: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 7月, 2017 1 次提交
-
-
由 Christos Gkekas 提交于
Variable mode in method wacom_show_remote_mode() is defined as u8, thus statement (mode >= 0) is always true and should be removed, simplifying the logic. Signed-off-by: NChristos Gkekas <chris.gekas@gmail.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 06 5月, 2017 1 次提交
-
-
由 Jason Gerecke 提交于
At the moment, our driver relies on 'wacom_battery_get_property()' to determine the most likely battery state (e.g charging, discharging, or full) based on the information available. It is not always possible for the function to properly determine this, however. For instance, whenever an AES pen leaves proximity the battery state becomes indeterminite. This commit adds the ability to provide it with explict state information if desired. Whenever explicit state is not required (the majority of circumstances), WACOM_POWER_SUPPLY_STATUS_AUTO can be used in its place. Three uses of explicit battery status are added: two wireless disconnect paths and the AES case mentioned above. 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>
-
- 30 3月, 2017 2 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Commit a544c619 ("HID: wacom: do not attempt to switch mode while in probe") introduces delayed work for querying (setting the mode) on all tablets. Bamboo Touch (056a:00d0) has a ghost interface which claims to be a pen device. Though this device can be removed, we have to set the mode on the ghost pen interface before we remove it. After the aforementioned delay was introduced the device was being removed before the mode setting could be executed. Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
A previous commit (below) adds a check for already probed interfaces to Wacom's matching heuristic. Unfortunately this causes the Bamboo Pen (CTL-460) to match itself to its 'ghost' touch interface. After subsequent changes to the driver this match to the ghost causes the kernel to crash. This patch avoids calling wacom_add_shared_data() for the BAMBOO_PEN's ghost touch interface. Fixes: 41372d5d ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 21 3月, 2017 1 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Commit 5b779fc5 introduces the manual release of resources in wacom_remove() as an addition to the driver's use of devm. The EKR resources can only be released through wacom_remote_destroy_one() so we skip the manual release for it. Fixes: 5b779fc5 ("HID: wacom: release the resources before leaving despite devm") Signed-off-by: NAaron Armstrong Skomra <skomra@gmail.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 06 3月, 2017 2 次提交
-
-
由 Ping Cheng 提交于
Wacom Cintiq Pro has a softkey to turn touch on/off. Since it is a softkey, hardware/firmware still reports touch events no matter what state the softkey is. We need to ignore touch events when the key is in off mode. Signed-off-by: NPing Cheng <ping.cheng@wacom.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Wacom Cintiq Pro added a touch key to switch the tablet between display and opaque mode. This patch informs the change by removing the old devices and creating new ones with proper properties. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NPing Cheng <ping.cheng@wacom.com> Tested-by: NAaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 27 1月, 2017 5 次提交
-
-
由 Aaron Armstrong Skomra 提交于
Add support for the LEDs around the mode switch to the generic code path in support of the second generation Intuos Pro. Signed-off-by: NAaron Skomra <aaron.skomra@wacom.com> Reviewed-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
The second generation Intuos Pro is the first device in the generic codepath which has a touchswitch. We utilize a flag in wacom_shared in order to report this switch event received from the pad on the touch input. Signed-off-by: NAaron Skomra <aaron.skomra@wacom.com> Reviewed-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Aaron Armstrong Skomra 提交于
Add vendor defined touch to support the second generation Intuos Pro. Previously all generic Wacom devices used true HID to report their touch. Signed-off-by: NAaron Skomra <aaron.skomra@wacom.com> Reviewed-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 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>
-
由 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>
-
- 23 1月, 2017 3 次提交
-
-
由 Benjamin Tissoires 提交于
The Intuos Pro seems to not like when we set the features right after being powered up. Instead of waiting during probe, we can schedule the switch mode and LED control in a deferred worker so that we don't have the 5 secs of delay from USB when the device is not accessible. The USB timeout delays were really a pain because if you happen to unplug the tablet while it is still waiting, you are just adding 5 second timeouts to the USB stack. Which means that a new plug of the same tablet will also gets delayed, and will also attempt to access the hardware while in .probe(). So the tablet doesn't appear in the dmesg, the user unplug/replug it to make it appearing... and so on so forth. Really, this is for the best :) Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
When the LED class gets removed, it actually tries to reset the LED. However, the device being disconnected, the set_report fails. Previously, the attempt to cut lose this last event was through unsetting the HID drvdata, but it was not working properly. Simply reset the LED groups to NULL makes a more efficient solution. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
In the general case, the resources are properly released by devm without needing to do anything. However, when unplugging the wireless receiver, the kernel segfaults from time to time while calling devres_release_all(). I think in that case the resources attempt to access hid_get_drvdata(hdev) which has been set to null while leaving wacom_remove(). Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NJason Gerecke <jason.gerecke@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 19 1月, 2017 1 次提交
-
-
由 Jason Gerecke 提交于
Commit 345857bb ("HID: wacom: generic: Add support for sensor offsets") included a change to the operation and location of the call to 'wacom_add_shared_data' in 'wacom_parse_and_register'. The modifications included moving it higher up so that it would occur before the call to 'wacom_retrieve_hid_descriptor'. This was done to prevent a crash that would have occured when the report containing tablet offsets was fed into the driver with 'wacom_hid_report_raw_event' (specifically: the various 'wacom_wac_*_report' functions were written with the assumption that they would only be called once tablet setup had completed; 'wacom_wac_pen_report' in particular dereferences 'shared' which wasn't yet allocated). Moving the call to 'wacom_add_shared_data' effectively prevented the crash but also broke the sibiling detection code which assumes that the HID descriptor has been read and the various device_type flags set. To fix this situation, we restore the original 'wacom_add_shared_data' operation and location and instead implement an alternative change that can also prevent the crash. Specifically, we notice that the report functions mentioned above expect to be called only for input reports. By adding a check, we can prevent feature reports (such as the offset report) from causing trouble. Fixes: 345857bb ("HID: wacom: generic: Add support for sensor offsets") Signed-off-by: NJason Gerecke <jason.gerecke@wacom.com> Tested-by: NPing Cheng <pingc@wacom.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 06 1月, 2017 1 次提交
-
-
由 Grant Grundler 提交于
Local "#define DRIVER_LICENSE" obfuscates which license is used in MODULE_LICENSE(). "fgrep -R MODULE_LICENSE" is more informative when the string is hard coded in MODULE_LICENSE. Signed-off-by: NGrant Grundler <grundler@google.com> Reviewed-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
- 20 10月, 2016 5 次提交
-
-
由 Jason Gerecke 提交于
Many of Wacom's display tablets include an "outbound" area where pen digitizing is possible but outside of the display area. To accommodate such sensors in the HID_GENERIC codepath, we add support for the necessary vendor-defined HID feature usages and adjust the min/max values of the X and Y axes accordingly, similar to what is done in the non-generic codepath. 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 提交于
Wacom's new "MobileStudio Pro" tablets are the first devices in their branded product line-up to include a usable HID descriptor for the pen interface. Like prior branded products, the device can operate in one of two modes: 'Standard HID', and 'Wacom Custom HID'. Although the first mode is usable by the HID_GENERIC codepath as-is (huzzah!), it is subject to some restrictions -- most notably pressure being limited to 2048 levels instead of 8192. To ensure tablets that include support for Custom HID mode work optimally, we add support for its usages and switch the device to Custom HID mode if possible. The usages defined for Custom HID mode are often numerically similar to their standard HID equivalents, allowing us to write a simple translation function that takes arbitrary HID usages as input and which returns the corresponding standard HID usage as output (if one exists). Switching on this translated usage instead of the actual usage allows the existing cases to apply to both modes of operation without having to explicitly define every Custom HID usage. 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 提交于
The product name received from the string descriptor in the new MobileStudio Pro line of tablets begins with "Wacom", which leads to unnecessary visual noise in the device name when appended to the vendor name which also includes "Wacom". Look for and fix cases like this. 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 提交于
ISDv4 devices have long supported reporting data from each of two barrel switches, but HID_DG_BARRELSWITCH2 itself was only recently standardized. Prior to its adoption, ISDv4 devices would associate the bit indicating the state of the second barrel switch with the "Undefined" 0x000D0000 usage. Although most such devices have explicit support, a few use the HID_GENERIC codepath which ignores the "Undefined" usage. This patch adds code which detects the presence of a pre-standard second barrel switch and corrects the usage value so that the HID_GENERIC code will declare its presence and report its state. 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 提交于
Our loose use of "pen" and "digitizer" in the naming of several of our vendor-defined usages may be a source of confusion given that the terms have specific meaning within the HID specification. "Pen" specifically refers to "an integrated display that allows the use of a stylus" (e.g. something like a tablet PC or Cintiq) wheras "Digitizer" is a better fit for opaque tablets like an Intuos. While we're at it, go ahead and rename the definitions to make them more distinct and better match up with the convention used by HID (e.g. the use of '_UP_' for usage pages) and make them more distinct. 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>
-
- 10 8月, 2016 1 次提交
-
-
由 Jason Gerecke 提交于
The 'oVid' and 'oPid' variables used by wacom_are_sibling are a hacky solution to the problem of the driver historically having few good heuristics to use in determining if two devices should be considered siblings or not. While it works well enough for explicitly supported devices, it offers no help for HID_GENERIC devices. Now that we have a bit more information (e.g. direct/indirect) available to us though, we should make use of it it to improve the pairing of such 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>
-
- 05 8月, 2016 16 次提交
-
-
由 Benjamin Tissoires 提交于
Instead of displaying a generic "tablet", now g-c-c shows a pretty "Wacom Intuos Pro S (WL)". Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Looks like upowerd is ignoring this since October 2013, so there is no need to keep this around in the kernel. And as mentioned in 8aaa592 (linux: Ignore ACs coming from devices) in the upower tree, "We already have enough information on the device battery". Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
When upowerd detects a new device, it tries to map this new device to an input to guess its kind. It works OK for wired tablets when the wireless module and its battery are attached, but not so well when connected over wireless. In that case, the battery is attached to the wireless HID node, not the Pen or Pad HID node. So there is no input node as a parent of the reported battery, which means it will be showed as a computer battery in gnome-control-center. If we set the power supply type to USB, upowerd has a heuristic that detects "wacom_" in the name of the power_supply, and set the type to tablet. So it's now clear that the reported battery of from a tablet. (see https://cgit.freedesktop.org/upower/tree/src/linux/up-device-supply.c) Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
The EKR switches the LED directly, and there is no point in having userspace handling the switch it self when it's easy enough to do in the kernel. The other benefit is that now userspace does not need to have root access to the LED but need only to read them with user privileges. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
There is a bug (?) in devm_led_classdev_register() in which its increments the refcount of the parent. If the parent is an input device, that means the ref count never reaches 0 when devm_input_device_release() gets called. This means that the LEDs and all the devres resources attached to the input device are not released. Manually force the release of the group so that the leds are released once we are done using them. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
The now obsolete sysfs files for LEDs and EKRemote are kept for backward compatibility. Both the EKR (read-only) and the regular Cintiqs and Intuos are now sharing the same led API. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Or Gnome complains about an empty battery. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Previously, all the remotes attached to the same receiver would share the same power_supply. That's not good as the remotes will constantly change the battery information according to their own state. To have something generic enough, we introduce struct wacom_battery which regroups all the information we need for a battery. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Thanks to devres, we can now afford to create more than one input node without having to overload the remove/failure paths. Having one input node per remote is something which should have been implemented from start but the probability of having users with several remotes is quite low. Anyway, still, better looking at the future and implement things properly. Remote input nodes will be freed/unregistered magically as they are created in the devres group &remote->remotes[index]. We need to open the hid node now that the remotes are dynamically allocated. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
No functional changes, just a prep patch for the one after. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
This will be useful when each remote will be assigned its own input device. We won't need to unregister each input and sysfs and other elements one at a time. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
The wacom_remote_create_attr_group() and wacom_remote_destroy_attr_group() functions were both allocating/destroying the sysfs groups but also initializing the parameters for the remotes. Have proper functions that can be called and extended. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
Thanks to devres management, we don't need to remember a lot of failure path. One or two is enough. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
If we want to have one input device per remote, it's better to have our own struct wacom_remote which is dynamically allocated. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
wacom_remote_status_irq() sends information of addition/removal of EKR. We want to allocate one input node per remote, so better having this in a separate worker, not handled in the IRQ directly. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-
由 Benjamin Tissoires 提交于
We need to add an action to ensure wacom->led.groups is null when wacom_led_control() gets called after the resources has been freed. This also prevents to send a LED command when there is no support from the device. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: NPing Cheng <pingc@wacom.com> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
-