History log of /linux-master/drivers/hid/hid-kye.c
Revision Date Author Comments
# 0f6fac2c 11-Apr-2023 David Yang <mmyangfl@gmail.com>

HID: kye: Fix rdesc for kye tablets

I forget to add them in previous commit 2dd438cdc2e9
("HID: kye: Add support for all kye tablets").

Signed-off-by: David Yang <mmyangfl@gmail.com>
Link: https://lore.kernel.org/r/20230411173308.422756-1-mmyangfl@gmail.com
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>


# 2dd438cd 06-Feb-2023 David Yang <mmyangfl@gmail.com>

HID: kye: Add support for all kye tablets

Physical data for all kye tablets are collected from Windows driver, to
generate correct HID reports.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 8c7b79bc 06-Feb-2023 David Yang <mmyangfl@gmail.com>

HID: kye: Sort kye devices

Sort kye devices by their Produce IDs.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 4782c0e0 06-Feb-2023 David Yang <mmyangfl@gmail.com>

HID: kye: Generate tablet fixup descriptors on the fly

Remove duplicated descriptor structures and make it easier to discover
bugs.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# b8cd2d96 06-Feb-2023 David Yang <mmyangfl@gmail.com>

HID: kye: Rewrite tablet descriptor fixup routine

Genius digitizer tablets send incorrect (vendor-defined) report descriptors
by default. Descriptors for several models were added to override original
ones. Since they share the same structure and are handled by the same
Windows driver routine, extract the descriptor template and dynamic
parameters for easier new device adoption.

Signed-off-by: David Yang <mmyangfl@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# f7d8e387 08-May-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Switch to Digitizer usage for styluses

The (incorrect) "Pen" (0x02) application usage used in replacement
report descriptors throughout the drivers leads to all tablets
recognized as a "direct" input device (i.e. a tablet monitor) by
recent kernels, which messes up desktop environments [1].

Replace the application usage with "Digitizer" (0x01) for each
non-display graphics tablet.

[1] https://lore.kernel.org/linux-input/f39ce5d5-bd5b-bd3f-3ea2-9b2a89ba1eb1@gmail.com/

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# a3760cd7 26-Mar-2021 Lee Jones <lee.jones@linaro.org>

HID: hid-kye: Fix incorrect function name for kye_tablet_enable()

Fixes the following W=1 kernel build warning(s):

drivers/hid/hid-kye.c:666: warning: expecting prototype for Enable fully(). Prototype was for kye_tablet_enable() instead

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-input@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>


# 2874c5fd 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 3029 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070032.746973796@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5e55e2aa 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: kye: Add support for EasyPen M406XE

Originally contributed by Andrey Alekseenko <al42and@gmail.com>.

Signed-off-by: Andrey Alekseenko <al42and@gmail.com>
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>


# 3f8b6fb7 27-Feb-2017 Masahiro Yamada <yamada.masahiro@socionext.com>

scripts/spelling.txt: add "comsume(r)" pattern and fix typo instances

Fix typos and add the following to the scripts/spelling.txt:

comsume||consume
comsumer||consumer
comsuming||consuming

I see some variable names with this pattern, but this commit is only
touching comment blocks to avoid unexpected impact.

Link: http://lkml.kernel.org/r/1481573103-11329-19-git-send-email-yamada.masahiro@socionext.com
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 515cdc19 14-Sep-2016 Nikolai Kondrashov <spbnick@gmail.com>

HID: kye: Fix MousePen i608X v2 report descriptor

Add a dedicated, fixed report descriptor for the second version of KYE
MousePen i608X graphics tablet. The descriptor fixes pressure and
drawing area ranges.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 102750b8 14-Sep-2016 Nikolai Kondrashov <spbnick@gmail.com>

HID: kye: Rename MousePen i608X v2 macro

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>


# ce7ef551 14-Sep-2016 Nikolai Kondrashov <spbnick@gmail.com>

HID: Remove broken links to tablet descriptions

Remove comments with broken links to tablet descriptions from
hid-kye/uclogic/waltop drivers.

They pointed to now dead DIGImend project wiki at sf.net. Even though
the DIGImend project still hosts descriptions, now at
digimend.github.io, it's better to avoid them going stale again, and let
anyone interested search the web instead.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# feb6faf1 14-Feb-2015 Milan Plzik <milan.plzik@gmail.com>

HID: kye: Fix report descriptor for Genius PenSketch M912

Genius PenSketch M912 digitizer tablet sends incorrect report descriptor by
default. This patch replaces it with a corrected one.

Signed-off-by: Milan Plzik <milan.plzik@gmail.com>
Reviewed-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 2bacedad 26-Dec-2014 Giedrius Statkevičius <giedrius.statkevicius@gmail.com>

HID: Add a new id 0x501a for Genius MousePen i608X

New Genius MousePen i608X devices have a new id 0x501a instead of the
old 0x5011 so add a new #define with "_2" appended and change required
places.

The remaining two checkpatch warnings about line length
being over 80 characters are present in the original files too and this
patch was made in the same style (no line break).

Just adding a new id and changing the required places should make the
new device work without any issues according to the bug report in the
following url.

This patch was made according to and fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=67111

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 4ab25786 21-Aug-2014 Jiri Kosina <jkosina@suse.cz>

HID: fix a couple of off-by-ones

There are a few very theoretical off-by-one bugs in report descriptor size
checking when performing a pre-parsing fixup. Fix those.

Cc: stable@vger.kernel.org
Reported-by: Ben Hawkes <hawkes@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 0a5f99cf 30-Nov-2013 Ben Hutchings <ben@decadent.org.uk>

HID: kye: Fix missing break in kye_report_fixup()

The change to support Genius Manticore Keyboard also changed behaviour
for Genius Gx Imperator Keyboard, as there is no break between the
cases. This is presumably a mistake.

Reported by Coverity as CID 1134029.

Fixes: 4a2c94c9b6c0 ('HID: kye: Add report fixup for Genius Manticore Keyboard')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 8a396321 20-Nov-2013 Benjamin Tissoires <benjamin.tissoires@redhat.com>

HID: kye: fix unresponsive keyboard

The manticore keyboard requires that all usb EP are opened at least
once to be fully functional. The third EP forwards to the user space
some vendor specific information about the keyboard state, but are useless
currently for the kernel.

Opening them and closing them makes the keyboard responsive again.

Reported-and-tested-by: Adam Kulagowski <fidor@fidor.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 4a2c94c9 20-Nov-2013 Benjamin Tissoires <benjamin.tissoires@redhat.com>

HID: kye: Add report fixup for Genius Manticore Keyboard

Genius Manticore Keyboard presents the same problem in its report
descriptors than Genius Gila Gaming Mouse and Genius Imperator Keyboard.
Use the same fixup.

Reported-and-tested-by: Adam Kulagowski <fidor@fidor.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 0adb9c2c 15-Jul-2013 Benjamin Tissoires <benjamin.tissoires@redhat.com>

HID: kye: Add report fixup for Genius Gx Imperator Keyboard

Genius Gx Imperator Keyboard presents the same problem in its report
descriptors than Genius Gila Gaming Mouse.
Use the same fixup for both.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=928561

Reported-and-tested-by: Honza Brazdil <jbrazdil@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 3685c18e 02-Jul-2013 Benjamin Tissoires <benjamin.tissoires@redhat.com>

HID: kye: Add report fixup for Genius Gila Gaming mouse

Genius Gila Gaming Mouse presents an obviously wrong report descriptor.
the Consumer control (report ID 3) is the following:
0x05, 0x0c, // Usage Page (Consumer Devices) 105
0x09, 0x01, // Usage (Consumer Control) 107
0xa1, 0x01, // Collection (Application) 109
0x85, 0x03, // Report ID (3) 111
0x19, 0x00, // Usage Minimum (0) 113
0x2a, 0xff, 0x7f, // Usage Maximum (32767) 115
0x15, 0x00, // Logical Minimum (0) 118
0x26, 0xff, 0x7f, // Logical Maximum (32767) 120
0x75, 0x10, // Report Size (16) 123
0x95, 0x03, // Report Count (3) 125
0x81, 0x00, // Input (Data,Arr,Abs) 127
0x75, 0x08, // Report Size (8) 129
0x95, 0x01, // Report Count (1) 131
0x81, 0x01, // Input (Cnst,Arr,Abs) 133
0xc0, // End Collection 135

So the first input whithin this report has a count of 3 but a usage range
of 32768. So this value is obviously wrong as it should not be greater than
the report count.

Fixes:
https://bugzilla.redhat.com/show_bug.cgi?id=959721

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# d8814272 25-Feb-2013 Benjamin Tissoires <benjamin.tissoires@gmail.com>

HID: use hid_hw_request() instead of direct call to usbhid

This allows the hid drivers to be independent from the transport layer.

The patch was constructed by replacing all occurences of
usbhid_submit_report() by its hid_hw_request() counterpart.
Then, drivers not requiring USB_HID anymore have their USB_HID
dependency cleaned in the Kconfig file.

Finally, few drivers still depends on USB_HID. Many of them
are requiring the io wait callback. They are found in the next patch.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

For the sensor-hub part:
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# f425458e 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>


# 22ca20b2 28-Feb-2012 Nikolai Kondrashov <spbnick@gmail.com>

HID: kye: Add support for 3 tablets

Add support for three KYE tablets: EasyPen i405X, MousePen i608X, EasyPen M610X.
Update Kconfig entry accordingly, remove EXPERT dependency.

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 4291ee30 09-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>


# 73e4008d 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>


# a24f423b 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>


# afa5eb7c 18-Mar-2009 Jiri Slaby <jirislaby@kernel.org>

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>


# 79422741 11-Mar-2009 Jiri Kosina <jkosina@suse.cz>

HID: add support for Kye/Genius Ergo 525V

This device sends several buttons in a separate field, which is
wrongly described in the report descriptor. Fix it in the following
way:

- change led usage page to button
- report size 8 count 1 becomes report size 1 count 8
- the button usage range changed to 4-7 (the mouse has three buttons in
a different field already).

Reported-by: Tomas Hanak <tomas.hanak@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>