<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/hid.h, branch linux-6.5.y</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.5.y</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=linux-6.5.y'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-09-13T07:53:41+00:00</updated>
<entry>
<title>HID: input: Support devices sending Eraser without Invert</title>
<updated>2023-09-13T07:53:41+00:00</updated>
<author>
<name>Illia Ostapyshyn</name>
<email>ostapyshyn@sra.uni-hannover.de</email>
</author>
<published>2023-06-13T15:26:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6360b396e81b5295aa9ee3d4f9af13b9bbbbac65'/>
<id>urn:sha1:6360b396e81b5295aa9ee3d4f9af13b9bbbbac65</id>
<content type='text'>
[ Upstream commit 276e14e6c3993317257e1787e93b7166fbc30905 ]

Some digitizers (notably XP-Pen Artist 24) do not report the Invert
usage when erasing.  This causes the device to be permanently stuck with
the BTN_TOOL_RUBBER tool after sending Eraser, as Invert is the only
usage that can release the tool.  In this state, Touch and Inrange are
no longer reported to userspace, rendering the pen unusable.

Prior to commit 87562fcd1342 ("HID: input: remove the need for
HID_QUIRK_INVERT"), BTN_TOOL_RUBBER was never set and Eraser events were
simply translated into BTN_TOUCH without causing an inconsistent state.

Introduce HID_QUIRK_NOINVERT for such digitizers and detect them during
hidinput_configure_usage().  This quirk causes the tool to be released
as soon as Eraser is reported as not set.  Set BTN_TOOL_RUBBER in
input-&gt;keybit when mapping Eraser.

Fixes: 87562fcd1342 ("HID: input: remove the need for HID_QUIRK_INVERT")
Co-developed-by: Nils Fuhler &lt;nils@nilsfuhler.de&gt;
Signed-off-by: Nils Fuhler &lt;nils@nilsfuhler.de&gt;
Signed-off-by: Illia Ostapyshyn &lt;ostapyshyn@sra.uni-hannover.de&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>HID: ensure timely release of driver-allocated resources</title>
<updated>2023-05-26T18:45:39+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2023-05-23T21:04:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62c68e7cee332e08e625af3bca3318814086490d'/>
<id>urn:sha1:62c68e7cee332e08e625af3bca3318814086490d</id>
<content type='text'>
More and more drivers rely on devres to manage their resources, however
if bus' probe() and release() methods are not trivial and control some
of resources as well (for example enable or disable clocks, or attach
device to a power domain), we need to make sure that driver-allocated
resources are released immediately after driver's remove() method
returns, and not postponed until driver core gets around to releasing
resources.

In case of HID we should not try to close the report and release
associated memory until after all devres callbacks are executed. To fix
that we open a new devres group before calling driver's probe() and
explicitly release it when we return from driver's remove().

This is similar to what we did for I2C bus in commit 5b5475826c52 ("i2c:
ensure timely release of driver-allocated resources"). It is tempting to
try and move this into driver core, but actually doing so is challenging,
we need to split bus' remove() method into pre- and post-remove methods,
which would make the logic even less clear.

Reported-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
Link: https://lore.kernel.org/r/20230505232417.1377393-1-swboyd@chromium.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: Recognize "Digitizer" as a valid input application</title>
<updated>2023-03-30T15:35:42+00:00</updated>
<author>
<name>Jason Gerecke</name>
<email>jason.gerecke@wacom.com</email>
</author>
<published>2022-10-19T15:18:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a0f5276716c80415230b47e321e1c46357d70993'/>
<id>urn:sha1:a0f5276716c80415230b47e321e1c46357d70993</id>
<content type='text'>
"Digitizer" is a generic usage that may be used by various devices but
which is particularly used by non-display pen tablets. This patch adds the
usage to the list of values matched by the IS_INPUT_APPLICATION() macro
that determines if an input device should be allocated or not.

Signed-off-by: Jason Gerecke &lt;jason.gerecke@wacom.com&gt;
Reviewed-by: Ping Cheng &lt;ping.cheng@wacom.com&gt;
Link: https://lore.kernel.org/r/20221019151832.44522-1-jason.gerecke@wacom.com
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: add KEY_CAMERA_FOCUS event in HID</title>
<updated>2023-03-10T14:21:11+00:00</updated>
<author>
<name>fengqi</name>
<email>fengqi@xiaomi.com</email>
</author>
<published>2023-02-16T08:48:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=740b2f03f80e8f50c3f96309bc123bea040de8d0'/>
<id>urn:sha1:740b2f03f80e8f50c3f96309bc123bea040de8d0</id>
<content type='text'>
Our HID device need KEY_CAMERA_FOCUS event to control camera,
but this event is non-existent in current HID driver.
So we add this event in hid-input.c.

Signed-off-by: fengqi &lt;fengqi@xiaomi.com&gt;
Reviewed-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>HID: core: Provide new max_buffer_size attribute to over-ride the default</title>
<updated>2023-02-23T10:51:56+00:00</updated>
<author>
<name>Lee Jones</name>
<email>lee@kernel.org</email>
</author>
<published>2023-01-23T12:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b1a37ed00d7908a991c1d0f18a8cba3c2aa99bdc'/>
<id>urn:sha1:b1a37ed00d7908a991c1d0f18a8cba3c2aa99bdc</id>
<content type='text'>
Presently, when a report is processed, its proposed size, provided by
the user of the API (as Report Size * Report Count) is compared against
the subsystem default HID_MAX_BUFFER_SIZE (16k).  However, some
low-level HID drivers allocate a reduced amount of memory to their
buffers (e.g. UHID only allocates UHID_DATA_MAX (4k) buffers), rending
this check inadequate in some cases.

In these circumstances, if the received report ends up being smaller
than the proposed report size, the remainder of the buffer is zeroed.
That is, the space between sizeof(csize) (size of the current report)
and the rsize (size proposed i.e. Report Size * Report Count), which can
be handled up to HID_MAX_BUFFER_SIZE (16k).  Meaning that memset()
shoots straight past the end of the buffer boundary and starts zeroing
out in-use values, often resulting in calamity.

This patch introduces a new variable into 'struct hid_ll_driver' where
individual low-level drivers can over-ride the default maximum value of
HID_MAX_BUFFER_SIZE (16k) with something more sympathetic to the
interface.

Signed-off-by: Lee Jones &lt;lee@kernel.org&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-6.3/hid-bpf' into for-linus</title>
<updated>2023-02-22T09:44:31+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2023-02-22T09:44:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=904e28c6de083fa4834cdbd0026470ddc30676fc'/>
<id>urn:sha1:904e28c6de083fa4834cdbd0026470ddc30676fc</id>
<content type='text'>
Initial support of HID-BPF (Benjamin Tissoires)

The history is a little long for this series, as it was intended to be
sent for v6.2. However some last minute issues forced us to postpone it
to v6.3.

Conflicts:
* drivers/hid/i2c-hid/Kconfig:
  commit bf7660dab30d ("HID: stop drivers from selecting CONFIG_HID")
  conflicts with commit 2afac81dd165 ("HID: fix I2C_HID not selected
  when I2C_HID_OF_ELAN is")
  the resolution is simple enough: just drop the "default" and "select"
  lines as the new commit from Arnd is doing
</content>
</entry>
<entry>
<title>Merge branch 'for-6.3/multitouch' into for-linus</title>
<updated>2023-02-22T09:39:05+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>benjamin.tissoires@redhat.com</email>
</author>
<published>2023-02-22T09:39:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c21c9feed40e8e64ad73d81acaecf6feaf860300'/>
<id>urn:sha1:c21c9feed40e8e64ad73d81acaecf6feaf860300</id>
<content type='text'>
Allow to pass quirks from i2c-hid to hid-multitouch (Allen Ballway &amp;
Dmitry Torokhov)
</content>
</entry>
<entry>
<title>HID: retain initial quirks set up when creating HID devices</title>
<updated>2023-02-09T13:24:30+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2023-02-07T23:03:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03a86105556e23650e4470c09f91cf7c360d5e28'/>
<id>urn:sha1:03a86105556e23650e4470c09f91cf7c360d5e28</id>
<content type='text'>
In certain circumstances, such as when creating I2C-connected HID
devices, we want to pass and retain some quirks (axis inversion, etc).
The source of such quirks may be device tree, or DMI data, or something
else not readily available to the HID core itself and therefore cannot
be reconstructed easily. To allow this, introduce "initial_quirks" field
in hid_device structure and use it when determining the final set of
quirks.

This fixes the problem with i2c-hid setting up device-tree sourced
quirks too late and losing them on device rebind, and also allows to
sever the tie between hid-code and i2c-hid when applying DMI-based
quirks.

Fixes: b60d3c803d76 ("HID: i2c-hid-of: Expose the touchscreen-inverted properties")
Fixes: a2f416bf062a ("HID: multitouch: Add quirks for flipped axes")
Reviewed-by: Guenter Roeck &lt;groeck@chromium.org&gt;
Tested-by: Allen Ballway &lt;ballway@chromium.org&gt;
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
Reviewed-by: Alistair Francis &lt;alistair@alistair23.me&gt;
Link: https://lore.kernel.org/r/Y+LYwu3Zs13hdVDy@google.com
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: use standard debug APIs</title>
<updated>2023-02-06T14:11:45+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2022-12-23T21:30:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3f16ba1c0768de6cdc6f65105757ef04dbfd8e5c'/>
<id>urn:sha1:3f16ba1c0768de6cdc6f65105757ef04dbfd8e5c</id>
<content type='text'>
The custom "debug" module parameter is fairly inflexible.
It can only manage debugging for all calls dbg_hid() at the same time.

Furthermore it creates a mismatch between calls to hid_dbg() which can
be managed by CONFIG_DYNAMIC_DEBUG and dbg_hid() which is managed by the
module parameter.

Furthermore the change to pr_debug() allows the debugging statements to
be completely compiled-out if desired.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Tested-by: Bastien Nocera &lt;hadess@hadess.net&gt;
Link: https://lore.kernel.org/r/20221223-hid-dbg-v1-1-5dcf8794f7f9@weissschuh.net
Signed-off-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
</content>
</entry>
<entry>
<title>HID: Make lowlevel driver structs const</title>
<updated>2023-01-17T12:44:02+00:00</updated>
<author>
<name>Thomas Weißschuh</name>
<email>linux@weissschuh.net</email>
</author>
<published>2022-12-22T05:10:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=52d22534690446d1f4b45436b570f77df3e855ba'/>
<id>urn:sha1:52d22534690446d1f4b45436b570f77df3e855ba</id>
<content type='text'>
Nothing is nor should be modifying these structs so mark them as const.

Signed-off-by: Thomas Weißschuh &lt;linux@weissschuh.net&gt;
Reviewed-by: David Rheinsberg &lt;david.rheinsberg@gmail.com&gt;
Reviewed-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
</content>
</entry>
</feed>
