linux/include
Benjamin Tissoires 190d7f02ce HID: input: do not increment usages when a duplicate is found
This is something that bothered us from a long time. When hid-input
doesn't know how to map a usage, it uses *_MISC. But there is something
else which increments the usage if the evdev code is already used.

This leads to few issues:
- some devices may have their ABS_X mapped to ABS_Y if they export a bad
  set of usages (see the DragonRise joysticks IIRC -> fixed in a specific
  HID driver)
- *_MISC + N might (will) conflict with other defined axes (my Logitech
  H800 exports some multitouch axes because of that)
- this prevents to freely add some new evdev usages, because "hey, my
  headset will now report ABS_COFFEE, and it's not coffee capable".

So let's try to kill this nonsense, and hope we won't break too many
devices.

I my headset case, the ABS_MISC axes are created because of some
proprietary usages, so we might not break that many devices.

For backward compatibility, a quirk HID_QUIRK_INCREMENT_USAGE_ON_DUPLICATE
is created and can be applied to any device that needs this behavior.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-04-17 14:08:54 +02:00
..
acpi Merge branches 'acpi-battery', 'acpi-doc' and 'acpi-pmic' 2018-04-02 10:58:13 +02:00
asm-generic arm64 updates for 4.17 2018-04-04 16:01:43 -07:00
clocksource
crypto crypto: api - Remove unused crypto_type lookup function 2018-03-31 01:32:57 +08:00
drm Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
dt-bindings sound updates for 4.17-rc1 2018-04-05 10:42:07 -07:00
keys
kvm KVM: arm/arm64: Reset mapped IRQs on VM reset 2018-03-14 18:29:14 +00:00
linux HID: input: do not increment usages when a duplicate is found 2018-04-17 14:08:54 +02:00
math-emu
media media updates for v4.17-rc1 2018-04-03 17:16:59 -07:00
memory
misc
net ipv6: allow to cache dst for a connected sk in ip6_sk_dst_lookup_flow() 2018-04-04 11:31:57 -04:00
pcmcia
ras
rdma Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
scsi dma-mapping updates for 4.17: 2018-04-05 10:23:24 -07:00
soc Linux 4.16-rc5 2018-03-18 17:48:59 +01:00
sound sound updates for 4.17-rc1 2018-04-05 10:42:07 -07:00
target
trace Cleanups and bugfixes for ext4, including some fixes to make ext4 more 2018-04-04 14:19:24 -07:00
uapi sound updates for 4.17-rc1 2018-04-05 10:42:07 -07:00
video
xen