Still try to run the other commands though, they're not receiver-related and
may work on a device that's not on a unifying receiver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Now that we have a separate HID++ 1.0 driver, we can restore this. Except the
fake button mapping.
This reverts commit 874fc3386f.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This screws with the HID++1.0 unifying receivers. Let's punt the
responsibility for opening the right hidraw node to the caller and only error
out if we fail the ioctl.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
As seen on the T650.
Reusing most of 0x1b04 here, except this one only gives us control id, task id
and flags.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
When the button is not redirected, we need to rely on the control_id,
not the task_id to get the logical action of the button.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Problem: when a button is diverted, it stops sending its original button,
which is good, but then reports only on the HID++ long report collection.
That is a little bit embarrassing.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
well, there is no fine grain while outputing the raw events, so that
means that we have always shown the actual answer just before.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
I misread the documentation. The task_id corresponds to what the button
has been physically designed to, and the control_id is the logical
remapping.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
The function does not take any argument, so the device ignores it,
but valgrind complains.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
And remove the spurious comments that have been introduced in
f759cbdcef ("drivers: do not declare defines that are used only once").
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This driver is really a driver for HID++ 2.0 devices, not just for devices on
the unifying receiver.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The 2.0 GetProtocolVersion request will fail on 1.0 devices but there is no
equivalent for 1.0. The doc even suggests to detect this error to determine
whether a device is a 1.0 device. Thus, make it conditional on whether we
print the error or not (log it as debug message if turned off).
This should be reconsidered when we have everything in place and can think
about refacturing.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
0x8 was a random SW number picked, add that consistently and automatically so
it doesn't look like the command names require this.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There is no gain at declaring the PID of the mice we support in
libratbag-private.h
Make it per driver, and remove the extra declarations.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>