<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/testing/selftests/hid/tests/test_tablet.py, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-10T14:20:27+00:00</updated>
<entry>
<title>selftests/hid: sync the python tests to hid-tools 0.8</title>
<updated>2025-07-10T14:20:27+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2025-07-09T09:08:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=642f9b2d608cc2239d22957ca1dc557d07470b50'/>
<id>urn:sha1:642f9b2d608cc2239d22957ca1dc557d07470b50</id>
<content type='text'>
Instead of backporting one by one each commits, let's pull them in bulk
and refer to the hid-tools project for a detailed history.

The short summary is:
- make use of dataclass when possible, to avoid tuples
- wacom: remove unused uhdev parameter
- various small fixes not worth mentioning

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Link: https://patch.msgid.link/20250709-wip-fix-ci-v1-2-b7df4c271cf8@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: run ruff format on the python part</title>
<updated>2025-07-10T14:20:23+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2025-07-09T09:08:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c85a8cb9b8d3a3dd9bb12879b28fc377dd24272b'/>
<id>urn:sha1:c85a8cb9b8d3a3dd9bb12879b28fc377dd24272b</id>
<content type='text'>
We aim at syncing with the hid-tools repo on
gitlab.freedesktop.org/libevdev/hid-tools. One of the commits is this
mechanical formatting, so pull it over here so changes are not hidden by
those.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Link: https://patch.msgid.link/20250709-wip-fix-ci-v1-1-b7df4c271cf8@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: add Huion Kamvas Pro 19 tests</title>
<updated>2024-05-07T13:39:43+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-04-10T17:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=51de9ee0a6c7f0d06fa7b80ff2ef9f3f661c3eb6'/>
<id>urn:sha1:51de9ee0a6c7f0d06fa7b80ff2ef9f3f661c3eb6</id>
<content type='text'>
This tablets gets a lot of things wrong:
- the secondary button is reported through Secondary Tip Switch
- the third button is reported through Invert

We need to add some out of proximity intermediate state when moving
back and forth with the eraser mode as it can only be triggered by
physically returning the pen, meaning that the tolerated transitions
can never happen.

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-15-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: tablets: also check for XP-Pen offset correction</title>
<updated>2024-05-07T13:39:39+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-04-10T17:19:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1b2c3caf7839adff892d8397995803d93e347974'/>
<id>urn:sha1:1b2c3caf7839adff892d8397995803d93e347974</id>
<content type='text'>
The values are taken from the HID-BPF file.
Basically we are recomputing the array provided there.

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-14-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: tablets: add a couple of XP-PEN tablets</title>
<updated>2024-05-07T13:39:34+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-04-10T17:19:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03899011df4b2bb0f9b3ac57b1044b161a336f31'/>
<id>urn:sha1:03899011df4b2bb0f9b3ac57b1044b161a336f31</id>
<content type='text'>
Those tablets don't need special initialization, but are reporting
the events with the wrong usages:
- tip switch is used when the eraser should be used
- eraser is used instead of the secondary barrel switch

Add tests for those so we don't regress in the future.

Currently we set x/y tilt to 0 to not trigger the bpf program
compensate_coordinates_by_tilt()

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-13-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: tablets: reduce the number of pen state</title>
<updated>2024-05-07T13:39:30+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2024-04-10T17:19:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e14d88d9b8dae40c6f612c6fc74b7d03d12f3c94'/>
<id>urn:sha1:e14d88d9b8dae40c6f612c6fc74b7d03d12f3c94</id>
<content type='text'>
All the *_WITH*BUTTON states were almost identical except for the
button itself.

I need to add a new device with a third button, and adding a bunch of
states is going to be quite cumbersome.

So convert the `button` parameter of PenState as a boolean, and store
which button is the target as an argument to all functions that need it.

Link: https://lore.kernel.org/r/20240410-bpf_sources-v1-12-a8bf16033ef8@kernel.org
Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: fix failing tablet button tests</title>
<updated>2023-12-07T13:55:00+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2023-12-07T12:22:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=da2c1b861065b452590d75a1e2f5ee9b396fef92'/>
<id>urn:sha1:da2c1b861065b452590d75a1e2f5ee9b396fef92</id>
<content type='text'>
An overlook from commit 74452d6329be ("selftests/hid: tablets: add
variants of states with buttons"), where I don't use the Enum...

Fixes: 74452d6329be ("selftests/hid: tablets: add variants of states with buttons")
Acked-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Link: https://lore.kernel.org/r/20231207-b4-wip-selftests-v1-1-c4e13fe04a70@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: fix mypy complains</title>
<updated>2023-12-07T08:52:04+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2023-12-06T10:46:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ed5bc56cedca19ac429533aa527bce5287ab0a5a'/>
<id>urn:sha1:ed5bc56cedca19ac429533aa527bce5287ab0a5a</id>
<content type='text'>
No code change, only typing information added/ignored

Acked-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-14-c0350c2f5986@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: tablets: be stricter for some transitions</title>
<updated>2023-12-07T08:52:04+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2023-12-06T10:46:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ab9b82909e9baa5b559d6457487525cfd4df2738'/>
<id>urn:sha1:ab9b82909e9baa5b559d6457487525cfd4df2738</id>
<content type='text'>
To accommodate for legacy devices, we rely on the last state of a
transition to be valid:
for example when we test PEN_IS_OUT_OF_RANGE to PEN_IS_IN_CONTACT,
any "normal" device that reports an InRange bit would insert a
PEN_IS_IN_RANGE state between the 2.

This is of course valid, but this solution prevents to detect false
releases emitted by some firmware:
when pressing an "eraser mode" button, they might send an extra
PEN_IS_OUT_OF_RANGE that we may want to filter.

So define 2 sets of transitions: one that is the ideal behavior, and
one that is OK, it won't break user space, but we have serious doubts
if we are doing the right thing. And depending on the test, either
ask only for valid transitions, or tolerate weird ones.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-13-c0350c2f5986@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/hid: tablets: add a secondary barrel switch test</title>
<updated>2023-12-07T08:52:04+00:00</updated>
<author>
<name>Benjamin Tissoires</name>
<email>bentiss@kernel.org</email>
</author>
<published>2023-12-06T10:46:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=76df1f72fb258cc7da6eff5dd8db95f4e2856517'/>
<id>urn:sha1:76df1f72fb258cc7da6eff5dd8db95f4e2856517</id>
<content type='text'>
Some tablets report 2 barrel switches. We better test those too.

Use the same transistions description from the primary button tests.

Reviewed-by: Peter Hutterer &lt;peter.hutterer@who-t.net&gt;
Acked-by: Jiri Kosina &lt;jkosina@suse.com&gt;
Link: https://lore.kernel.org/r/20231206-wip-selftests-v2-12-c0350c2f5986@kernel.org
Signed-off-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
</content>
</entry>
</feed>
