History log of /linux-master/drivers/hid/hid-uclogic-core.c
Revision Date Author Comments
# dd613a4e 24-Aug-2023 Rahul Rameshbabu <sergeantsagara@protonmail.com>

HID: uclogic: Correct devm device reference for hidinput input_dev name

Reference the HID device rather than the input device for the devm
allocation of the input_dev name. Referencing the input_dev would lead to a
use-after-free when the input_dev was unregistered and subsequently fires a
uevent that depends on the name. At the point of firing the uevent, the
name would be freed by devres management.

Use devm_kasprintf to simplify the logic for allocating memory and
formatting the input_dev name string.

Reported-by: syzbot+3a0ebe8a52b89c63739d@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/linux-input/ZOZIZCND+L0P1wJc@penguin/T/
Reported-by: Maxime Ripard <mripard@kernel.org>
Closes: https://lore.kernel.org/linux-input/ZOZIZCND+L0P1wJc@penguin/T/#m443f3dce92520f74b6cf6ffa8653f9c92643d4ae
Fixes: cce2dbdf258e ("HID: uclogic: name the input nodes based on their tool")
Suggested-by: Maxime Ripard <mripard@kernel.org>
Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Rahul Rameshbabu <sergeantsagara@protonmail.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://lore.kernel.org/r/20230824061308.222021-2-sergeantsagara@protonmail.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>


# 9266a881 26-Dec-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add support for XP-PEN Deco Pro MW

The XP-PEN Deco Pro MW is a UGEE v2 device with a frame with 8 buttons,
a bitmap dial and a mouse. Its pen has 2 buttons, supports tilt and
pressure.

It can be connected using a USB cable or, to use it in wireless mode,
using a USB Bluetooth dongle. When it is connected in wireless mode the
device battery is used to power it.

All the pieces to support it are already in place. Add its ID and
quirks in order to support the device.

Link: https://github.com/DIGImend/digimend-kernel-drivers/issues/622
Tested-by: Andreas Grosse <andig.mail@t-online.de>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 7744ca57 26-Dec-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add support for XP-PEN Deco Pro SW

The XP-PEN Deco Pro SW is a UGEE v2 device with a frame with 8 buttons,
a bitmap dial and a mouse; however, the UCLOGIC_MOUSE_FRAME_QUIRK is
required because it reports an incorrect frame type. Its pen has 2
buttons, supports tilt and pressure.

It can be connected using a USB cable or, to use it in wireless mode,
using a USB Bluetooth dongle. When it is connected in wireless mode the
device battery is used to power it.

All the pieces to support it are already in place. Add its ID and
quirks in order to support the device.

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


# a251d657 26-Dec-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Handle wireless device reconnection

UGEEv2 tablets with battery can be connected using a USB cable or a USB
Bluetooth dongle.

When the Bluetooth dongle is used, the connection to that tablet can be
lost because the tablet is out of the range of the receiver or because
it was switched off using the switch placed in the back of the tablet's
frame.

After losing connection, the tablet is able to reconnect automatically
and its firmware sends a special packet indicating that the device was
reconnected. In response to this packet, the tablet needs to receive the
same array of magic data it expects on probe to enable its interfaces.

This patch implements a generic mechanism to hook raw events and
schedule a work to perform any custom action.

Tested-by: Mia Kanashi <chad@redpilled.dev>
Tested-by: Andreas Grosse <andig.mail@t-online.de>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 14b71e6a 26-Dec-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add frame type quirk

The report descriptor used to get information about UGEE v2 devices is
incorrect in the XP-PEN Deco Pro SW. It indicates that the device frame
is of type UCLOGIC_PARAMS_FRAME_BUTTONS but the device has a frame of
type UCLOGIC_PARAMS_FRAME_MOUSE.

Here is the original report descriptor:

0x0e 0x03 0xc8 0xb3 0x34 0x65 0x08 0x00 0xff 0x1f 0xd8 0x13 0x00 0x00
^ This byte should be 2

Add a quirk to be able to fix the reported frame type.

Tested-by: Mia Kanashi <chad@redpilled.dev>
Tested-by: Andreas Grosse <andig.mail@t-online.de>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# febb2c0d 26-Dec-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add support for XP-PEN Deco 01 V2

The XP-PEN Deco 01 V2 is a UGEE v2 device with a frame with 8 buttons.
Its pen has 2 buttons, supports tilt and pressure.

Add its ID in order to support the device.

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/839
Tested-by: Mark Waddoups <mwaddoups@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 3405a4be 10-Nov-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add HID_QUIRK_HIDINPUT_FORCE quirk

Commit f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for
styluses") changed the usage used in UCLogic from "Pen" to "Digitizer".

However, the IS_INPUT_APPLICATION() macro evaluates to false for
HID_DG_DIGITIZER causing issues with the XP-Pen Star G640 tablet.

Add the HID_QUIRK_HIDINPUT_FORCE quirk to bypass the
IS_INPUT_APPLICATION() check.

Reported-by: Torge Matthies <openglfreak@googlemail.com>
Reported-by: Alexander Zhang <alex@alexyzhang.dev>
Tested-by: Alexander Zhang <alex@alexyzhang.dev>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 7495fb7e 15-Aug-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add support for Parblo A610 PRO

The Parblo A610 PRO is a UGEE v2 device with a frame with 9 buttons
and a bitmap dial. Its pen has 2 buttons, supports tilt and pressure.

Add its ID in order to support the device.

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


# 93b40b3e 15-Aug-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add support for XP-PEN Deco Pro S

The XP-PEN Deco Pro S is a UGEE v2 device with a frame with 8 buttons,
a bitmap dial and a mouse. Its pen has 2 buttons, supports tilt and
pressure.

All the pieces to support it are already in place. Add its ID in order
to support the device.

The required Wireshark traces were captured by Jouke Witteveen.
For more information check [1].

Link: https://gitlab.freedesktop.org/libinput/libinput/-/issues/738 [1]
Tested-by: Jouke Witteveen <j.witteveen@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 0977fda0 15-Aug-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add missing suffix for digitalizers

The Pen (0x02) application usage was changed to Digitalizer (0x01) in
commit f7d8e387d9ae ("HID: uclogic: Switch to Digitizer usage for
styluses"). However, a suffix was not selected for the new usage.

Handle the digitalizer application usage in uclogic_input_configured()
and add the required suffix.

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


# 0cb1fc09 11-Jun-2022 José Expósito <jose.exposito89@gmail.com>

HID: uclogic: Add support for XP-PEN Deco L

The XP-PEN Deco L (UGEE) needs to be initialized by sending a buffer of
magic data, discovered by sniffing the Windows driver traffic.

In order to differentiate UGEE tablets that need this kind of
initialization from the previous ones, name them v2 internally and
create an entry point for them.

After initialization, the template report descriptors can be discovered
by parsing a string descriptor, similar to the one exposed by HUION v1
devices.

Add all the required elements to support the device.

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


# 61b1db5a 08-May-2022 Roman Romanenko <romu4444@gmail.com>

HID: uclogic: Add pen support for XP-PEN Star 06

Similar to other UGEE pens, but the IDs were missing.

Signed-off-by: Roman Romanenko <romu4444@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>


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

HID: uclogic: Always shift touch reports to zero

Always decrement touch report values to have the range start with zero,
regardless if flipped or not. This fixes the future non-flipped touch
strip reports.

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>


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

HID: uclogic: Do not focus on touch ring only

Accommodate both touch ring and touch strip in naming throughout
hid-uclogic by talking about abstract "touch" instead of "touch ring",
wherever possible.

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>


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

HID: uclogic: Move param printing to a function

Move parameter printing from a format string/argument list to a function
to allow printing the full parameters, which now wouldn't fit into a
single print call.

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>


# f5927973 21-Apr-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support disabling pen usage

Restore the ability to disable pen usage in hid-uclogic to support e.g.
keyboard interfaces which also have pen usages for some reason, but
which we don't want to rewrite report descriptors for.

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>


# 2112b49e 14-Apr-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Add support for bitmap dials

A bitmap dial sends reports with a dedicated bit per direction: 1 means
clockwise rotation, 2 means counterclockwise, as opposed to the normal
1 and -1 values.

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>


# ee007036 03-Mar-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support custom device suffix for frames

Support assigning custom device name suffixes to frame input devices
instead of just "Pad". This allows distinguishing multiple frame input
devices, e.g. for Huion HS610.

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>


# d170e8e0 03-Mar-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Add support for touch ring reports

Add support for touch ring to UC-Logic driver. The touch ring reports
can be flipped around a specific point to match the orientation and
direction reported by the Wacom drivers. The proximity will also be
reported similar to the Wacom drivers.

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>


# 337fa051 19-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support multiple frame input devices

Add support for multiple frame input devices and their parameters to
the UC-Logic driver. This prepares for creating a separate input device
for Huion HS610 virtual touch ring reports.

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>


# e6be956f 19-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Switch to matching subreport bytes

Switch from matching UC-Logic subreport with a mask to a full value to
support detecting Huion HS610 touch dial reports. Those would match the
button mask otherwise.

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>


# 8b013098 19-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Replace pen_frame_flag with subreport_list

Replace a single pen_frame_flag in struct uclogic_params with
subreport_list in struct uclogic_params_pen to prepare for handling more
subreports in Huion HS610.

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>


# 606dadc1 19-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Remove pen usage masking

Remove support for pen usage masking from hid-uclogic. Disable whole
interfaces instead. Most of those interfaces are useless, and if there
is one which has an unused pen usage, but also has useful reports, its
report descriptor should be rewritten instead.

This simplifies the code and the data structures.

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>


# 044fa816 10-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Handle virtual frame reports

Explicitly change report ID to virtual ID and handle virtual frame
reports as real for consistency.

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>


# fea53b9f 10-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Skip non-input raw events earlier

Early return when a non-input raw event is received to simplify the
logic present in uclogic_raw_event.

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>


# 7f12dd2469 10-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Access pen/frame params directly in raw_event handling

Simplify the raw event handling code by accessing the
uclogic_params_pen/uclogic_params_frame structs directly.

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>


# 7e418667 10-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Split pen and frame raw event handling

In order to avoid ending up with a big uclogic_raw_event function,
split it in two smaller functions: uclogic_raw_event_pen for the pen
events and uclogic_raw_event_frame for the pad events.

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>


# 85e86071 10-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Rename Huion HS64 PID to Huion Tablet 2

Since the 006d Huion PID is used by multiple tablets (at least HS64 and
HS610), rename its constant to a more general
"USB_DEVICE_ID_HUION_TABLET2".

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>


# 1324c5ac 10-Feb-2022 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support Huion tilt reporting

Add support for Huion v2 protocol tilt reporting. Describe reports as
angles in degrees, which is not exactly true, but there doesn't seem to
be a straightforward, consistent conversion possible, and what's
reported would have to be enough.

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>


# 93020953 01-Dec-2021 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

HID: check for valid USB device for many HID drivers

Many HID drivers assume that the HID device assigned to them is a USB
device as that was the only way HID devices used to be able to be
created in Linux. However, with the additional ways that HID devices
can be created for many different bus types, that is no longer true, so
properly check that we have a USB device associated with the HID device
before allowing a driver that makes this assumption to claim it.

Cc: Jiri Kosina <jikos@kernel.org>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: Michael Zaidman <michael.zaidman@gmail.com>
Cc: Stefan Achatz <erazor_de@users.sourceforge.net>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: linux-input@vger.kernel.org
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
[bentiss: amended for thrustmater.c hunk to apply]
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20211201183503.2373082-3-gregkh@linuxfoundation.org


# f7271b2a 27-Dec-2020 Cristian Klein <cristian.klein@elastisys.com>

HID: uclogic: Improve support for Trust Panora

After more discussions with the [libinput project][1], it has been
determined that the uclogic driver provides better support for this
tablet. Fortunately, the Trust Panora is physically and logically
identical with the UGEE G5, despite having a different USB vendor and
product ID.

[1]: https://gitlab.freedesktop.org/libinput/libinput/-/issues/482

Signed-off-by: Cristian Klein <cristian.klein@elastisys.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 022fc531 16-Oct-2020 Martijn van de Streek <martijn@zeewinde.xyz>

HID: uclogic: Add ID for Trust Flex Design Tablet

The Trust Flex Design Tablet has an UGTizer USB ID and requires the same
initialization as the UGTizer GP0610 to be detected as a graphics tablet
instead of a mouse.

Signed-off-by: Martijn van de Streek <martijn@zeewinde.xyz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 315ffcc9 15-Jun-2019 Kyle Godbey <me@kyle.ee>

HID: uclogic: Add support for Huion HS64 tablet

Add support for Huion HS64 drawing tablet to hid-uclogic

Signed-off-by: Kyle Godbey <me@kyle.ee>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 88bb346d 08-Jun-2019 Wang Xuerui <git@xen0n.name>

HID: uclogic: Add support for Ugee Rainbow CV720

Add support for Ugee Rainbow CV720 to hid-uclogic.

Signed-off-by: Wang Xuerui <git@xen0n.name>
Reviewed-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>


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

HID: uclogic: Add support for Ugee G5

Add support for Ugee G5 to hid-uclogic.

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


# 8a47670c 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support Gray-coded rotary encoders

Add support for converting Gray-coded rotary encoder input into dial
input compatible with HID standard. Needed for Ugee G5 support.

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


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

HID: uclogic: Support faking Wacom pad device ID

Add support for inserting a Wacom pad device ID into hid-uclogic
reports. This allows reporting dial inputs in a way compatible with the
Wacom driver. Needed for Ugee G5 support in particular.

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


# 08367be17 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Add support for XP-Pen Deco 01

Add support for XP-Pen Deco 01 to hid-uclogic.

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


# 492a9e9a 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Add support for XP-Pen Star G640

Add support for XP-Pen Star G640 to hid-uclogic.

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


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

HID: uclogic: Add support for XP-Pen Star G540

Add support for XP-Pen Star G540 to hid-uclogic.

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


# 0c15efe9 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Add support for Ugee 2150

Add support for Ugee 2150 to hid-uclogic.

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


# 59f2e0fc 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support fragmented high-res reports

Support parsing fragmented high-resolution reports in hid-uclogic to
support v2 reporting protocol.

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


# 01309e29 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Support in-range reporting emulation

Newer UC-Logic tablets, such as ones made by Huion have stopped
reporting in-range state, but they're otherwise worthy tablets. The
manufacturer was notified of the problem and promised to fix this in the
future. Meanwhile, detect pen coming in range, and emulate the reports
to the userspace, to make the tablets useable.

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


# 251b4275 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Re-initialize tablets on resume

Re-initialize UC-Logic tablets on resume. UC-Logic tablet initialization
and parameter retrieval cannot be separated for the large part, so
simply discard the retrieved parameters after initialization.

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


# 9614219e 09-Feb-2019 Nikolai Kondrashov <spbnick@gmail.com>

HID: uclogic: Extract tablet parameter discovery into a module

Refactor and extract UC-Logic tablet initialization and parameter
discovery into a module. For these tablets, the major part of parameter
discovery cannot be separated from initialization so they have to be in
the same module. Define explicitly and clearly what possible quirks the
tablets may have to make the driver implementation easier and simpler.

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


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

HID: uclogic: Extract report descriptors to a module

As hid-uclogic has a lot of report descriptors already and there's going
to be more, move them out of the driver code and into a separate module.

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