summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-core.c
AgeCommit message (Collapse)Author
2017-02-17HID: gearvr: add support for Samsung Gear VRnext/vr-20170117Andi Shyti
The Gear VR is a connected through USB to mobile phones and generates a hidraw device as interface to userspace. Change-Id: Ib7814fa6f86a034d5ab6fd59120efb8c2392f9bd Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
2017-02-03Merge branch 'for-4.10/upstream-fixes' into for-nextJiri Kosina
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-01-20Merge branch 'for-4.11/microsoft' into for-nextJiri Kosina
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-11Merge branch 'for-4.11/rmi' into for-nextJiri Kosina
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-11Merge branch 'for-4.11/mayflash' into for-nextJiri Kosina
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-11Merge branches 'for-4.10/upstream-fixes' and 'for-4.11/microsoft' into for-nextJiri Kosina
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-06Merge branch 'for-4.11/upstream' into for-nextJiri Kosina
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-05Merge branch 'for-4.10/upstream-fixes' into for-nextJiri Kosina
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>
2016-12-19HID: multitouch: enable the Surface 4 Type Cover Pro (JP) to report ↵Yuta Kobayashi
multitouch data Since commit 8fe89ef076fa1 ("HID: multitouch: enable the Surface 3 Type Cover to report multitouch data"), the TypeCover can be properly handled by hid-multitouch and don't require any special quirk in the kernel. Remove the support of the Surface 4 Type Cover Pro (JP) from hid-microsoft so it can properly report multitouch from the touchpad. Signed-off-by: Yuta Kobayashi <alu.ula@outlook.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-12-14Merge branches 'for-4.10/asus', 'for-4.10/cp2112', ↵Jiri Kosina
'for-4.10/i2c-hid-nopower', 'for-4.10/intel-ish', 'for-4.10/mayflash', 'for-4.10/microsoft-surface-3', 'for-4.10/multitouch', 'for-4.10/sony', 'for-4.10/udraw-ps3', 'for-4.10/upstream' and 'for-4.10/wacom/generic' into for-linus
2016-11-29HID: asus: Add i2c touchpad supportBrendan McGrath
Update the hid-asus module to add multitouch support for the Asus i2c touchpad. This patch aims to resolve the issue raised here: https://bugzilla.kernel.org/show_bug.cgi?id=120181 The issue is in relation to an Asus touchpad device which currently does not have multitouch support. The device currently falls through to the hid-generic driver which treats the device as a mouse. This patch aims to add the multitouch support. [jkosina@suse.cz: move most of the 'patch comment' into actual changelog] [jkosina@suse.cz: drop hunk that changes ->name of the driver] Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Brendan McGrath <redmcg@redmandi.dyndns.org> Signed-off-by: Victor Vlasenko <victor.vlasenko@sysgears.com> Signed-off-by: Frederik Wenigwieser <frederik.wenigwieser@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-11-29HID: sony: Support DS4 dongleRoderick Colenbrander
Add support for USB based DS4 dongle device, which allows connecting a DS4 through Bluetooth, but hides Bluetooth from the host system. Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-11-28HID: multitouch: enable the Surface 3 Type Cover to report multitouch dataBenjamin Tissoires
There is no reasons to filter out keyboard and consumer control collections in hid-multitouch. With the previous hid-input fix, there is now a full support of the Type Cover and we can remove all specific bits from hid-core and hid-microsoft. hid-multitouch will automatically set HID_QUIRK_NO_INIT_REPORTS so we can also remove it from the list of ushbid quirks. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-11-23HID: microsoft: Add Surface 4 type cover pro 4 not JP versionsDaniel Keller
Adding support for not JP versions of the Microsoft Surface 4 Type Cover Pro [jkosina@suse.cz: The identical patch has been sent by Jeff Farthing, so I am including his signoff as well] Signed-off-by: Jeff Farthing <jeff@jfarthing.com> Signed-off-by: Daniel Keller <daniel.keller@gcd.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-11-15HID: udraw-ps3: Add support for the uDraw tablet for PS3Bastien Nocera
This adds support for the THQ uDraw tablet for the PS3, as 4 separate device nodes, so that user-space can easily consume events coming from the hardware. Note that the touchpad two-finger support is fairly unreliable, and a right-click can only be achieved with a two-finger tap with the two fingers slightly apart (about 1cm should be enough). Tested-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-11-03HID: Add new force feedback driver for Mayflash game controller adaptersMarcel Hasler
Add a new module named hid-mf that implements force feedback for game controller adapters manufactured by Mayflash. Currently only the PS3 adapter is supported, other adapters still need to be tested. Signed-off-by: Marcel Hasler <mahasler@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-10-10HID: sony: Update device idsRoderick Colenbrander
Support additional DS4 model. Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-10-07Merge branches 'for-4.8/upstream-fixes', 'for-4.9/alps', ↵Jiri Kosina
'for-4.9/hid-input', 'for-4.9/intel-ish', 'for-4.9/kye-uclogic-waltop-fixes', 'for-4.9/logitech', 'for-4.9/sony', 'for-4.9/upstream' and 'for-4.9/wacom' into for-linus
2016-09-19HID: uclogic: Support UGTizer GP0610 partiallyNikolai Kondrashov
Add partial support for the UGTizer GP0610 tablet (aka iBall PF1064U, aka UGTizer GT1060) to the hid-uclogic.c driver. The pen input is supported fully, but frame buttons and wheel don't work yet. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-09-19HID: uclogic: Add support for several more tabletsNikolai Kondrashov
Add more product IDs to hid-uclogic.c driver to support several more tablet models, including: UC-Logic DrawImage G3 aka Ugee G3 UC-Logic SP1001 aka Ugee SP1001 aka Yiynova UC-Logic SP-1001 Ugee 1000L Ugee M708 Yiynova DP10U aka Yiynova DP10U+ Yiynova MSP19U Yiynova MSP19U+ Yiynova MVP10U aka Yiynova MVP10U IPS Yiynova MVP10UHD+IPS Yiynova MVP22U+ Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-09-19HID: kye: Rename MousePen i608X v2 macroNikolai Kondrashov
Rename the device ID macro for the second version of KYE MousePen i608x graphics tablet to have "V" in its name to signify that "2" is a version. I.e. USB_DEVICE_ID_KYE_MOUSEPEN_I608X_2 -> USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 This also makes applying additional fixes from DIGImend easier. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-08-17HID: microsoft: Add Surface 4 type cover pro 4 (JP)Yuta Kobayashi
Adding support for the Microsoft Surface 4 Type Cover Pro (JP). Signed-off-by: Yuta Kobayashi <alu.ula@outlook.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-08-02HID: Add a new Saitek mouse device ID (RAT 9)Mayeul Cantan
The new device has 06a3:0cfa as identifiers, and the same quirks as the other RAT models. It needs this fix in order not to confuse the xorg server with its tristate button, which is reported as three different buttons, one of which is always on. [jkosina@suse.cz: drop unrelated whitespace hunk] Signed-off-by: Mayeul Cantan <mayeul.cantan@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-08-02HID: use IS_ENABLED() instead of checking for built-in or moduleJavier Martinez Canillas
The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Using the macro makes the code more readable by helping abstract away some of the Kconfig built-in and module enable details. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-07-28Merge branch 'for-4.8/hid-led' into for-linusJiri Kosina
Conflicts: drivers/hid/hid-thingm.c
2016-07-28Merge branches 'for-4.8/alps', 'for-4.8/apple', 'for-4.8/i2c-hid', ↵Jiri Kosina
'for-4.8/uhid-offload-hid-device-add' and 'for-4.8/upstream' into for-linus
2016-07-11HID: add usb device id for Apple Magic KeyboardJean-Gabriel Gill-Couture
USB device Vendor 05ac (Apple) Device 0267 (Magic Keyboard) This keyboard supports both Bluetooth and USB connections, this patch only covers USB. Thanks to Maxime Poulin <maxpoulin64@gmail.com> Signed-off-by: Jean-Gabriel Gill-Couture <jeangab@jeangab.fr.nf> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-07-07HID: hid-led: add support for Greynut LuxaforHeiner Kallweit
Add support for Greynut Luxafor. This device has two groups of three independent LED's each. Successfully tested with such a device. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-07-07HID: hid-led: add support for Delcom Visual Signal Indicator G2Heiner Kallweit
Add support for the HID-compliant Delcom Visual Signal Indicator generation 2 devices. Successfully tested with part no 904000 from the family of these devices. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-23HID: alps: a few cleanupsMasaki Ota
Remove an unnecessary codes. Change input_ivent() function to appropriate function. Add the device ID of "HID_DEVICE_ID_ALPS_U1_DUAL". [jkosina@suse.cz: removed unnecessary bitshifts of values passed input_report_key() as spotted by Dmitry] Signed-off-by: Masaki Ota <masaki.ota@jp.alps.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-20HID: alps: match alps devices in coreJiri Kosina
All devices with ALPS_JP VID are handled by hid-alps driver, hence they require an entry in hid_have_special_driver[]. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-06-17HID: migrate USB LED driver from usb misc to hidHeiner Kallweit
This patch migrates the USB LED driver to the HID subsystem. Supported are Dream Cheeky Webmail Notifier / Friends Alert and Riso Kagaku Webmail Notifier. Benefits: - Avoid using USB low-level calls and use the HID subsystem instead (as this device provides a USB HID interface) - Use standard LED subsystem instead of proprietary sysfs entries, this allows e.g. to use the device with features like triggers Successfully tested with a Dream Cheeky Webmail Notifier and a Riso Kagaku Webmail Notifier compatible device. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-05-17Merge branch 'for-4.7/upstream' into for-linusJiri Kosina
Conflicts: drivers/hid/usbhid/hid-quirks.c
2016-05-17Merge branches 'for-4.6/upstream-fixes', 'for-4.7/asus', 'for-4.7/hidraw' ↵Jiri Kosina
and 'for-4.7/thingm' into for-linus
2016-04-07HID: simplify implement() a bitDmitry Torokhov
The 'size' variable is not really needed, and we can also shift constant in the loop body when masking off existing bits. Also we do not have to use 64 bit calculations if we take an extra branch. [jkosina@suse.cz: fix a small error in changelog] Suggested-by: Doug Anderson <dianders@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-04-04HID: microsoft: add support for 3 more devicesAlistair Leslie-Hughes
Adds support for the Micrsift Digital 4K, Media 600 and Media 3000 V1 Keyboards, which have the same quirks as the already existing hardware MS_NE4K. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=52841 [jkosina@suse.cz: rephrase changelog] Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-04-04HID: asus: add support for VivoBook E200HAYusuke Fujimaki
Asus X205TA and E200HA built-in keyboard contain wrong logical maximum value in report descriptor. This patch correct wrong logical maximum in report descriptor. Signed-off-by: Yusuke Fujimaki <usk.fujimaki@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-04-01HID: Asus X205TA keyboard driverYusuke Fujimaki
Asus X205TA built-in keyboard contains wrong logical maximum value in report descriptor. 0x05, 0x01, // Usage Page (Generic Desktop) 0x09, 0x06, // Usage (Keyboard) 0xa1, 0x01, // Collection (Application) 0x85, 0x01, // Report ID (1) 0x05, 0x07, // Usage Page (Keyboard/Keypad) 0x19, 0xe0, // Usage Minimum (224) 0x29, 0xe7, // Usage Maximum (231) 0x15, 0x00, // Logical Minimum (0) 0x25, 0x01, // Logical Maximum (1) 0x75, 0x01, // Report Size (1) 0x95, 0x08, // Report Count (8) 0x81, 0x02, // Input (Data,Array,Abs) 0x95, 0x01, // Report Count (1) 0x75, 0x08, // Report Size (8) 0x81, 0x03, // Input (Const,Var,Abs) 0x95, 0x05, // Report Count (5) 0x75, 0x01, // Report Size (1) 0x05, 0x08, // Usage (LED) 0x19, 0x01, // Usage Minimum (1) 0x29, 0x05, // Usage Maximum (5) 0x91, 0x02, // Output (Data,Var,Abs) 0x95, 0x01, // Report Count (1) 0x75, 0x03, // Report Size (3) 0x91, 0x03, // Output (Const,Var,Abs) 0x95, 0x06, // Report Count (6) 0x75, 0x08, // Report Size (8) 0x15, 0x00, // Logical Minimum (0) 0x25, 0x65, // Logical Maximum (101) * too small * 0x05, 0x07, // Usage Page (Keyboard/Keypad) 0x19, 0x00, // Usage Minimum (0) 0x29, 0xdd, // Usage Maximum (221) 0x81, 0x00, // Input(Data,Array,Abs) In Asus X205TA japanese keyboard model,there are language specific keys over usage id 101. This patch correct wrong logical maximum in report descriptor. Signed-off-by: Yusuke Fujimaki <usk.fujimaki@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-03-17Merge branches 'for-4.5/upstream-fixes', 'for-4.6/cmedia', ↵Jiri Kosina
'for-4.6/i2c-hid', 'for-4.6/logitech', 'for-4.6/multitouch', 'for-4.6/penmount', 'for-4.6/sony', 'for-4.6/thingm', 'for-4.6/upstream' and 'for-4.6/wacom' into for-linus
2016-03-16HID: microsoft: Add ID for MS Wireless Comfort KeyboardSlava Bacherikov
Microsoft Wireless Comfort Keyboard has vendor specific My Favorites 1-5 keys. Linux already supports this buttons on other MS keyboards by MS_ERGONOMY quirk. So apply MS_ERGONOMY quirk to USB PID 0x00e3 (Microsoft Wireless Optical Desktop Receiver 3.0A). After this My Favorites 1..5 keys will be reported as KEY_F14..KEY_F15 events. Signed-off-by: Slava Bacherikov <slava@bacher09.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2016-03-02HID: Support for CMedia CM6533 HID audio jack controlsBen Chen
The C-Media CM6533 is a USB audio chip featuring it's jack detection capability.The device originates an interrupt transfer via HID interface each time when a jack event occurs. The purpose of this patch is to handle hid raw events to keep the operating system informed of user interactions. Signed-off-by: Ben Chen <ben_chen@bizlinktech.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>