summaryrefslogtreecommitdiff
path: root/drivers/hid
AgeCommit message (Collapse)Author
2017-02-21Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fix from Jiri Kosina: "Regression fix for HID_RMI-driven synaptics touchpads in !CONFIG_HID_RMI cases" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: rmi: fallback to generic/multitouch if hid-rmi is not built
2017-02-21Merge tag 'media/v4.11-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - new drivers: - i.MX6 Video Data Order Adapter's (VDOA) - Toshiba et8ek8 5MP sensor - STM DELTA multi-format video decoder V4L2 driver - SPI connected IR LED - Mediatek IR remote receiver - ZyDAS ZD1301 DVB USB interface driver - new RC keymaps - some very old LIRC drivers got removed from staging - RC core gained support encoding IR scan codes - DVB si2168 gained support for DVBv5 statistics - lirc_sir driver ported to rc-core and promoted from staging - other bug fixes, board additions and driver improvements * tag 'media/v4.11-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (230 commits) [media] mtk-vcodec: fix build warnings without DEBUG [media] zd1301: fix building interface driver without demodulator [media] usbtv: add sharpness control [media] cxusb: Use a dma capable buffer also for reading [media] ttpci: address stringop overflow warning [media] dvb-usb-v2: avoid use-after-free [media] add Hama Hybrid DVB-T Stick support [media] et8ek8: Fix compiler / Coccinelle warnings [media] media: fix semicolon.cocci warnings [media] media: exynos4-is: add flags to dummy Exynos IS i2c adapter [media] v4l: of: check for unique lanes in data-lanes and clock-lanes [media] coda/imx-vdoa: constify structs [media] st-delta: debug: trace stream/frame information & summary [media] st-delta: add mjpeg support [media] st-delta: EOS (End Of Stream) support [media] st-delta: rpmsg ipc support [media] st-delta: add memory allocator helper functions [media] st-delta: STiH4xx multi-format video decoder v4l2 driver [media] MAINTAINERS: add st-delta driver [media] ARM: multi_v7_defconfig: enable STMicroelectronics DELTA Support ...
2017-02-22HID: rmi: fallback to generic/multitouch if hid-rmi is not builtJiri Kosina
Commit 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") unconditionally switches over handling of all Synaptics touchpads to hid-rmi (to make use of extended features of the HW); in case CONFIG_HID_RMI is disabled though this renders the touchpad unusable, as the HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID) match doesn't exist and generic/multitouch doesn't bind to it either (due to hid group mismatch). Fix this by switching over to hid-rmi only if it has been actually built. Fixes: 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi") Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Tested-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-02-20Merge branches 'for-4.10/upstream-fixes', 'for-4.11/intel-ish', ↵Jiri Kosina
'for-4.11/mayflash', 'for-4.11/microsoft', 'for-4.11/rmi', 'for-4.11/upstream' and 'for-4.11/wacom' into for-linus
2017-02-14HID: intel-ish-hid: constify device_type structureBhumika Goyal
Declare device_type structure as const as it is only stored in the type field of a device structure. This field is of type const, so add const to the declaration of device_type structure. File size before: drivers/hid/intel-ish-hid/ishtp/bus.o text data bss dec hex filename 4260 336 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o File size after: drivers/hid/intel-ish-hid/ishtp/bus.o text data bss dec hex filename 4324 272 16 4612 1204 hid/intel-ish-hid/ishtp/bus.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-02-14HID: wacom: Bluetooth IRQ for Intuos Pro should handle prox/rangeJason Gerecke
The prox/range bits included in the Bluetooth reports from the Intuos Pro were being ignored, leading to two issues. Firstly, the pen would never announce a BTN_TOOL_PEN event with value 0, leaving userspace to believe the pen was always active. Secondly, the driver would continue to send events for data while the packet's "prox" bit was clear. This can lead to sudden incorrect pointer jumps if the pen is slowly moved away from the tablet surface. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-02-08HID: intel-ish-hid: ipc: check FW status to distinguish ISH resume pathsEven Xu
For ISH resume, there are two paths, they need different way to handle: one where ISH is not powered off, in that case a simple resume message is enough, in other case we need a reset sequence. We can use ISH FW status to distinguish those two cases and handle them properly. Signed-off-by: Even Xu <even.xu@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-02-03HID: multitouch: fix LG Melfas touchscreenBenjamin Tissoires
The LG Melfas touchscreen has a bad firmware where it declares the Contact ID field as constant while it shouldn't. This messes up the autodetection and the reporting of the events by hid-multitouch given that hid-input ignores constant fields. The autodetection is simply worked around by manually adding the device to hid_have_special_driver[]. The processing of the events requires either a report fixup, or some specific case handling. Given that the report fixup would require to basically rewrite all the report descriptor, I went for the programatic way of fixing that after the report descriptors are loaded. Link: https://bugzilla.redhat.com/show_bug.cgi?id=1416181 Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-02-03HID: wacom: don't apply generic settings to old devicesPing Cheng
Non-generic devices have numbered_buttons set for both pen and touch interfaces by default. The actual number of buttons on the interface is normally manually decided later, which is different from what those HID generic devices are processed, where number of buttons are directly retrieved from HID descriptors. This patch adds the missed HID_GENERIC check and moves the statement to wacom_setup_pad_input_capabilities since it's not a quirk anymore. Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-31HID: cp2112: fix gpio-callback error handlingJohan Hovold
In case of a zero-length report, the gpio direction_input callback would currently return success instead of an errno. Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-31HID: cp2112: fix sleep-while-atomicJohan Hovold
A recent commit fixing DMA-buffers on stack added a shared transfer buffer protected by a spinlock. This is broken as the USB HID request callbacks can sleep. Fix this up by replacing the spinlock with a mutex. Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@kernel.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-30[media] rc-main: assign driver type during allocationAndi Shyti
The driver type can be assigned immediately when an RC device requests to the framework to allocate the device. This is an 'enum rc_driver_type' data type and specifies whether the device is a raw receiver or scancode receiver. The type will be given as parameter to the rc_allocate_device device. Change accordingly all the drivers calling rc_allocate_device() so that the device type is specified during the rc device allocation. Whenever the device type is not specified, it will be set as RC_DRIVER_SCANCODE which was the default '0' value. Suggested-by: Sean Young <sean@mess.org> Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-30[media] rc: raw IR drivers cannot handle cec, unknown or otherSean Young
unknown and other are for IR protocols for which we have no decoder, so the raw IR drivers have no chance of generating them. cec is not an IR protocol. Signed-off-by: Sean Young <sean@mess.org> Cc: Jiri Kosina <jikos@kernel.org> Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-01-26HID: hid-lg: Fix immediate disconnection of Logitech Rumblepad 2Ardinartsev Nikita
With NOGET quirk Logitech F510 is now fully workable in dinput mode including rumble effects (according to fftest). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117091 [jkosina@suse.cz: fix patch format] Signed-off-by: Ardinartsev Nikita <ardinar23@gmail.com> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: usbhid: Quirk a AMI virtual mouse and keyboard with ALWAYS_POLLColin Ian King
Quirking the following AMI USB device with ALWAYS_POLL fixes an AMI virtual keyboard and mouse from not responding and timing out when it is attached to a ppc64el Power 8 system and when we have some rapid open/closes on the mouse device. usb 1-3: new high-speed USB device number 2 using xhci_hcd usb 1-3: New USB device found, idVendor=046b, idProduct=ff01 usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-3: Product: Virtual Hub usb 1-3: Manufacturer: American Megatrends Inc. usb 1-3: SerialNumber: serial usb 1-3.3: new high-speed USB device number 3 using xhci_hcd usb 1-3.3: New USB device found, idVendor=046b, idProduct=ff31 usb 1-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-3.3: Product: Virtual HardDisk Device usb 1-3.3: Manufacturer: American Megatrends Inc. usb 1-3.4: new low-speed USB device number 4 using xhci_hcd usb 1-3.4: New USB device found, idVendor=046b, idProduct=ff10 usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 usb 1-3.4: Product: Virtual Keyboard and Mouse usb 1-3.4: Manufacturer: American Megatrends Inc. With the quirk I have not been able to trigger the issue with half an hour of saturation soak testing. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: Fix poor prox handling in 'wacom_pl_irq'Jason Gerecke
Commit 025bcc1 performed cleanup work on the 'wacom_pl_irq' function, making it follow the standards used in the rest of the codebase. The change unintiontionally allowed the function to send input events from reports that are not marked as being in prox. This can cause problems as the report values for X, Y, etc. are not guaranteed to be correct. In particular, occasionally the tablet will send a report with these values set to zero. If such a report is received it can caus an unexpected jump in the XY position. This patch surrounds more of the processing code with a proximity check, preventing these zeroed reports from overwriting the current state. To be safe, only the tool type and ABS_MISC events should be reported when the pen is marked as being out of prox. Fixes: 025bcc1540 ("HID: wacom: Simplify 'wacom_pl_irq'") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: generic: support LEDsAaron 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: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: generic: support generic touch switchAaron 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: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: generic: add vendor defined touchAaron 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: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: generic: add support for touchringAaron Armstrong Skomra
Add support for the touchring to the generic code path in support of the second generation Intuos Pro. We also add checks for usage->type to ensure that we handle the usage before we report it, or change the inrange_state based on it. Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: generic: remove input_event_flagAaron Armstrong Skomra
Input_event_flag duplicates the information we track in wacom_wac->hid_data.inrange_state for the pad. Signed-off-by: Aaron Skomra <aaron.skomra@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interfaceJason 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: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: Move WAC_CMD_* into wacom_wac.hJason 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: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-26HID: wacom: Enable HID_GENERIC codepath for Bluetooth devicesJason Gerecke
There no reason a Bluetooth device with the appropriate HID descriptor couldn't be used through the HID_GENERIC codepath in the future. Ensure that the driver attempts to bind to these devices. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-23HID: wacom: do not attempt to switch mode while in probeBenjamin 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: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-23HID: wacom: remove warning while disconnecting devicesBenjamin 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: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-23HID: wacom: release the resources before leaving despite devmBenjamin 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: Benjamin Tissoires <benjamin.tissoires@redhat.com> Acked-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-20HID: whitespace cleanupDennis Chen
Removes trailing whitespace in hid-core.c and usbhid/hid-quirks.c Signed-off-by: Dennis Chen <barracks510@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-20HID: multitouch: enable Surface 3 Type Cover Pro to report multitouch dataDennis Chen
Nearly identical to the previous set of patches related to Microsoft Surface Keyboards. Removes Surface Pro 3 generation TypeCover support from hid-microsoft so proper multitouch data can be reported from the touchpad. Signed-off-by: Dennis Chen <barracks510@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-19HID: wacom: Fix sibling detection regressionJason Gerecke
Commit 345857b ("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: 345857bb49 ("HID: wacom: generic: Add support for sensor offsets") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Tested-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-13HID: corsair: fix control-transfer error handlingJohan Hovold
Make sure to check for short control transfers in order to avoid parsing uninitialised buffer data and leaking it to user space. Note that the backlight and macro-mode buffer constraints are kept as loose as possible in order to avoid any regressions should the current buffer sizes be larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-13HID: corsair: fix DMA buffers on stackJohan Hovold
Not all platforms support DMA to the stack, and specifically since v4.9 this is no longer supported on x86 with VMAP_STACK either. Note that the macro-mode buffer was larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: rmi: Support the Lenovo Thinkpad X1 Tablet dock using hid-rmiAndrew Duggan
Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: rmi: Handle all Synaptics touchpads using hid-rmiAndrew Duggan
With the addition of HID and F12 support in the synaptics-rmi4 driver touchpads which had been using the hid-multitouch driver can now be support by the synaptics-rmi4 via hid-rmi. The advantage is that additional data can be reported from the RMI registers which is not available in the Microsoft Precision Touchpad collection. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: rmi: Make hid-rmi a transport driver for synaptics-rmi4Andrew Duggan
The Synaptics RMI4 driver provides support for RMI4 devices. Instead of duplicating the RMI4 processing code, make hid-rmi a transport driver and register it with the Synaptics RMI4 core. Signed-off-by: Andrew Duggan <aduggan@synaptics.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: hid-mf: add force feedback support for Mayflash DolphinBar and GameCubeMarcel Hasler
The Mayflash DolphinBar and GameCube adapters have been tested and confirmed to work using the hid-mf driver. Signed-off-by: Marcel Hasler <mahasler@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: add device ID for updated Mayflash/Dragonrise GameCube adapterMarcel Hasler
The Mayflash GameCube adapter has received a firmware update which, among other things, changes the device's PID. It also fixes enumeration, therefore the updated firmware no longer requires HID_QUIRK_MULTI_INPUT. Signed-off-by: Marcel Hasler <mahasler@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: multitouch: enable Surface 4 Type Cover Pro (non-JP) to report ↵Daniel Keller
multitouch data Nearly identical to the patch "multitouch: enable the Surface 4 Type Cover Pro (JP) to report multitouch data" We can now remove the support of the Surface 4 Type Cover Pro (not JP versions) from hid-microsoft so it can properly report multi touch from the touchpad. Signed-off-by: Daniel Keller <daniel.keller@gcd.de> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-11HID: i2c-hid: Add sleep between POWER ON and RESETBrendan McGrath
Support for the Asus Touchpad was recently added. It turns out this device can fail initialisation (and become unusable) when the RESET command is sent too soon after the POWER ON command. Unfortunately the i2c-hid specification does not specify the need for a delay between these two commands. But it was discovered the Windows driver has a 1ms delay. As a result, this patch modifies the i2c-hid module to add a sleep inbetween the POWER ON and RESET commands which lasts between 1ms and 5ms. See https://github.com/vlasenko/hid-asus-dkms/issues/24 for further details. Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-06HID: hid-cypress: validate length of reportGreg Kroah-Hartman
Make sure we have enough of a report structure to validate before looking at it. Reported-by: Benoit Camredon <benoit.camredon@airbus.com> Tested-by: Benoit Camredon <benoit.camredon@airbus.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-06HID: remove use of DRIVER_LICENSEGrant 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: Grant Grundler <grundler@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-05HID: ignore Petzl USB headlampJiri Kosina
This headlamp contains a dummy HID descriptor which pretends to be a mouse-like device, but can't be used as a mouse at all. Reported-by: Lukas Ocilka <lukas.ocilka@suse.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-02HID: sensor-hub: Move the memset to sensor_hub_get_feature()Srinivas Pandruvada
While applying patch d443a0aa3a29: "HID: hid-sensor-hub: clear memory to avoid random data", there was some issues in applying correct version of the patch. This resulted in the breakage of sensor functions as all request like power-up will be reset by the memset() in the function sensor_hub_set_feature(). The reset of caller buffer should be in the function sensor_hub_get_feature(), not in the sensor_hub_set_feature(). Fixes: d443a0aa3a29 ("HID: hid-sensor-hub: clear memory to avoid random data") Cc: Stable <stable@vger.kernel.org> # 4.9+ Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-02HID: usbhid: Add quirk for Mayflash/Dragonrise DolphinBar.Marcel Hasler
The DolphinBar by Mayflash (identified as Dragonrise) needs HID_QUIRK_MULTI_INPUT to split it up into four input devices. Without this quirk the adapter is falsely recognized as a tablet. See also bug 115841 (https://bugzilla.kernel.org/show_bug.cgi?id=115841). Signed-off-by: Marcel Hasler <mahasler@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-02HID: usbhid: Add quirk for the Futaba TOSD-5711BB VFDAlex Wood
The Futaba TOSD-5711BB VFD crashes when the initial HID report is requested, register the display in hid-ids and tell hid-quirks to not do the init. Signed-off-by: Alex Wood <thetewood@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-02HID: intel-ish-hid: format 32-bit integers with %XNicolas Iooss
In ishtp_hid_probe(), use %04X instead of %04hX to format __u32 values, in order to silent a format error reported by clang: drivers/hid/intel-ish-hid/ishtp-hid.c:212:3: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat] hid->vendor, hid->product); ^~~~~~~~~~~ drivers/hid/intel-ish-hid/ishtp-hid.c:212:16: error: format specifies type 'unsigned short' but the argument has type '__u32' (aka 'unsigned int') [-Werror,-Wformat] hid->vendor, hid->product); ^~~~~~~~~~~~ Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2017-01-02HID: intel-ish-hid: add printf attribute to print_log()Nicolas Iooss
Structure ishtp_device contains a logging function, print_log(), which formats some of its parameters using vsnprintf(). Add a __printf attribute to this function field (and to ish_event_tracer()) in order to detect at compile time issues related to the printf-like formatting. While at it, make format parameter a const pointer as print_log() is not supposed to modify it. Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-12-19HID: sony: Ignore DS4 dongle reports when no device is connectedRoderick Colenbrander
When the DS4 dongle is connected, it always generates HID reports even when no DS4 is paired to it. This patch adds logic to ignore HID reports from the dongle if there is no DS4 currently attached. Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-12-19HID: sony: Use DS4 MAC address as unique identifier on USBRoderick Colenbrander
The DS4 MAC address is reported as a unique identified when using Bluetooth. For USB there is no unique identifier reported yet, so use the MAC address. Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-12-19HID: sony: Fix error handling bug when touchpad registration failsRoderick Colenbrander
The error handling code in sony_input_configured in general uses goto based cleanup. Recently we migrated code from sony_probe to here, but we didn't update the existing touchpad registration code, which was already here to use the goto. Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>