History log of /drivers/hid/hid-microsoft.c
Revision Date Author Comments
f3b0cbce01cd5c242b420d986b208d306bdc5083 31-Mar-2014 Derya <derya.kiran@yahoo.de> Revert "HID: microsoft: Add ID's for Surface Type/Touch Cover 2"

This reverts commit 117309c51dca42121f70cacec801511b76acf75c.

The MS Surface Pro 2 has an USB composite device with 3 interfaces
- interface 0 - sensor hub
- interface 1 - wacom digitizer
- interface 2 - the keyboard cover, if one is attached
This USB composite device changes it product id dependent on if and which
keyboard cover is attached. Adding the covers to hid_have_special_driver
prevents loading the right hid drivers for the other two interfaces, all 3
get loaded with hid-microsoft. We don't even need hid-microsoft for the
keyboards. We have to revert this to load the right hid modules for each
interface.

CC: stable@vger.kernel.org # kernel 3.14 only
Signed-off-by: Derya <derya.kiran@yahoo.de>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
34e75dca4e6313249c9a2faa8effeddce89b91ac 29-Jan-2014 Hans de Goede <hdegoede@redhat.com> HID: hid-microsoft: Add support for 2 reserved usage ids used on ms office kb

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3faed1aff786a007b3ea0549ac469e09f48c98f9 29-Jan-2014 Hans de Goede <hdegoede@redhat.com> HID: hid-microsoft: Add support for scrollwheel and special keypad keys

The Microsoft Office keyboard has a scrollwheel as well as some special keys
above the keypad which are handled through the custom MS usage page, this
commit adds support for these.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
aac59f6a96044f423408ee17f4e8e11d904c2b80 29-Jan-2014 Hans de Goede <hdegoede@redhat.com> HID: hid-microsoft: Do the check for the ms usage page per device

For some devices we may also want to do custom mappings for other pages.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
117309c51dca42121f70cacec801511b76acf75c 28-Jan-2014 Reyad Attiyat <reyad.attiyat@gmail.com> HID: microsoft: Add ID's for Surface Type/Touch Cover 2

The Microsoft Surface Type/Touch cover 2 devices have the flag HID_DG_CONTACTID
in their reports.This causes the device to bind to the hid-multitouch driver,
which doesn't handle generic keyboard/mouse input events. The patch adds
the hardware id's of the device to hid-microsoft and to the HID special
driver array, which makes the device get handled by hid-generic/hid-input
properly.

Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=64811

Singed-off-by: Reyad Attiyat <reyad.attiyat@gmail.com>
Reviewed-by: Benjamin Tissoires<benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
b2b98ea87a8d82d1100200324ace989970a92423 15-Dec-2013 Jiri Kosina <jkosina@suse.cz> HID: microsoft: no fallthrough in MS ergonomy 0xff05 usage

For 0xff05 usage in MS ergonomy keyboard quirk, we are falling through
and returning 0 instread of properly (because we've performed new mapping)
returning 1. Fix that.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
89759e20d9571e0496c7e12fc4a3ce2a5233f18e 29-Apr-2013 Adam Jiang <jiang.adam@gmail.com> HID: Add PID for Japanese version of NE4K keyboard

This patche adds PID of Japanese Natual Ergonomic Keyboard 4000. HID
NE4K driver depends on this PID for determining its quirks. F14-F18 keys
would not work without the patch.

Signed-off-by: Adam Jiang <jiang.adam@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f425458eafd51b6b5ab64f407922e1198c567cb2 17-Dec-2012 H Hartley Sweeten <hartleys@visionengravers.com> HID: Use module_hid_driver macro

Use the new module_hid_driver macro in all HID drivers that have
a simple register/unregister init/exit.

This also converts the hid drivers that test for a failure of
hid_register_driver() and report the failure. Using module_hid_driver
in those drivers removes the failure message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
6b90466cfec2a2fe027187d675d8d14217c12d82 12-Nov-2012 Jiri Slaby <jslaby@suse.cz> HID: microsoft: do not use compound literal - fix build

In patch "HID: microsoft: fix invalid rdesc for 3k kbd" I fixed
support for MS 3k keyboards. However the added check using memcmp and
a compound statement breaks build on architectures where memcmp is a
macro with parameters.

hid-microsoft.c:51:18: error: macro "memcmp" passed 6 arguments, but takes just 3

On x86_64, memcmp is a function, so I did not see the error.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
3ccc60f9d8c39180c205dba1a020735bda1b2491 19-Oct-2012 Jiri Slaby <jslaby@suse.cz> HID: microsoft: fix invalid rdesc for 3k kbd

Microsoft Digital Media Keyboard 3000 has two interfaces, and the
second one has a report descriptor with a bug. The second collection
says:
05 01 -- global; usage page -- 01 -- Generic Desktop Controls
09 80 -- local; usage -- 80 -- System Control
a1 01 -- main; collection -- 01 -- application

85 03 -- global; report ID -- 03
19 00 -- local; Usage Minimum -- 00
29 ff -- local; Usage Maximum -- ff
15 00 -- global; Logical Minimum -- 0
26 ff 00 -- global; Logical Maximum -- ff
81 00 -- main; input

c0 -- main; End Collection

I.e. it makes us think that there are all kinds of usages of system
control. That the keyboard is a not only a keyboard, but also a
joystick, mouse, gamepad, keypad, etc. The same as for the Wireless
Desktop Receiver, this should be Physical Min/Max. So fix that
appropriately.

References: https://bugzilla.novell.com/show_bug.cgi?id=776834
Cc: <stable@vger.kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2f43f8749ebaeb4934f73a6f864fcbb60ce9f48a 04-Sep-2012 Jiri Kosina <jkosina@suse.cz> HID: remove Paul Walmsley's copyright from places where it shouldn't be

Paul Walmsley has implemented dynamic quirk handling back in 2007 through
commits:

2eb5dc30eb ("USB HID: encapsulate quirk handling into hid-quirks.c")
8222fbe67c ("USB HID: clarify static quirk handling as squirks")
8cef908235 ("USB HID: add support for dynamically-created quirks")
876b9276b9 ("USB HID: add 'quirks' module parameter")

and as such, his copyright rightly belongs to
drivers/hid/usbhid/hid-quirks.c file.

However when generic HID code has been converted to bus and individual
quirks separated out to individual drivers on the bus, the copyright has
been blindly transfered into all the tiny drivers, which actually don't
contain any of Pauls' copyrighted code.

Remove the copyright from those sub-drivers.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Paul Walmsley <paul@pwsan.com>
23c10becdbc712de3fb35d0c7ec105a81d21f4c7 11-Jul-2011 Ari Savolainen <ari.m.savolainen@gmail.com> HID: fix horizontal wheel for ms comfort mouse 4500

Microsoft comfort mouse 4500 report descriptor contains duplicate
usages for horizontal wheel. This patch fixes the wrong mapping
caused by that.

Signed-off-by: Ari Savolainen <ari.m.savolainen@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
f3b83d71a1b1a1569dba774c3a4f6e2a3b9fef99 13-Jun-2011 Jiri Kosina <jkosina@suse.cz> HID: add support for MS Digital Media 3000

The Digital Media 3000 keyboard (USB id: 0x0730) features the same 1-5
Application Launch keys that the Natural Ergonomic 4000 has. Add its
usb id to the list of quirks.

Reported-by: Khelben Blackstaff <eye.of.the.8eholder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
4291ee305e9bb0699504a66f0e2b7aefcf0512a5 10-Dec-2010 Joe Perches <joe@perches.com> HID: Add and use hid_<level>: dev_<level> equivalents

Neaten current uses of dev_<level> by adding and using
hid specific hid_<level> macros.

Convert existing uses of dev_<level> uses to hid_<level>.
Convert hid-pidff printk uses to hid_<level>.

Remove err_hid and use hid_err instead.

Add missing newlines to logging messages where necessary.
Coalesce format strings.

Add and use pr_fmt(fmt) KBUILD_MODNAME ": " fmt

Other miscellaneous changes:

Add const struct hid_device * argument to hid-core functions
extract() and implement() so hid_<level> can be used by them.
Fix bad indentation in hid-core hid_input_field function
that calls extract() function above.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
73e4008ddddc84d5f2499c17012b340a0dae153e 06-Aug-2010 Nikolai Kondrashov <spbnick@gmail.com> HID: allow resizing and replacing report descriptors

Update hid_driver's report_fixup prototype to allow changing report
descriptor size and/or returning completely different report descriptor.
Update existing usage accordingly.

This is to give more freedom in descriptor fixup and to allow having a whole
fixed descriptor in the code for the sake of readability.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
a24f423bdf253ccee369adc6c5451b40a0716fbb 02-Jul-2009 Peter Huewe <peterhuewe@gmx.de> HID: adding __init/__exit macros to module init/exit functions

Trivial patch which adds the __init and __exit macros to the module_init /
module_exit functions of several HID drivers from drivers/hid/

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
afa5eb7c68689ced4284f01c96feed44a2d0a127 18-Mar-2009 Jiri Slaby <jirislaby@gmail.com> HID: remove compat stuff

This removal was scheduled and there is no problem with later
distros to adapt for the new bus, thanks to aliases.

module-init-tools map files are deprecated nowadays, so that
the patch which introduced hid ones into the m-i-t won't be
accepted and hence there is no reason for leaving compat stuff in.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
0fb21de0799a985d2da3da14ae5625d724256638 14-Jan-2009 Jiri Kosina <jkosina@suse.cz> HID: adjust report descriptor fixup for MS 1028 receiver

Report descriptor fixup for MS 1028 receiver changes also values for
Keyboard and Consumer, which incorrectly trims the range, causing correct
events being thrown away before passing to userspace.

We need to keep the GenDesk usage fixup though, as it reports totally bogus
values about axis.

Reported-by: Lucas Gadani <lgadani@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
93c10132a7ac160df3175b53f7ee857625412165 27-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move connect quirks

Move connecting from usbhid to the hid layer and fix also hidp in
that manner.
This removes all the ignore/force hidinput/hiddev connecting quirks.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
78a849a682a1d5ee7b7187b08abdc48656326a4e 20-Jun-2008 Jiri Slaby <jirislaby@gmail.com> HID: move microsoft quirks

Move them from the core code to a separate driver.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>