Dmitry Torokhov e8a0581914 HID: multitouch: make mt_set_mode() less cryptic
mt_set_mode() accepts 2 boolean switches indicating whether the device
(if it follows Windows Precision Touchpad specification) should report
hardware buttons and/or surface contacts. For a casual reader it is
completely not clear, as they look at the call site, which exact mode
is being requested.

Define report_mode enum and change mt_set_mode() to accept is as
an argument instead. This allows to write:

	mt_set_modes(hdev, HID_LATENCY_NORMAL, TOUCHPAD_REPORT_ALL);

or

	mt_set_modes(hdev, HID_LATENCY_HIGH, TOUCHPAD_REPORT_BUTTONS);

which makes intent much more clear.

Reviewed-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/Zx_hBvg5Qa3KU3ta@google.com
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
2024-11-18 21:49:47 +01:00
..
2024-10-24 16:31:58 -07:00
2024-09-19 09:42:21 +02:00
2024-11-06 07:49:54 -10:00
2024-05-22 10:45:12 -07:00
2024-05-22 10:45:12 -07:00
2023-10-25 18:33:42 +02:00
2024-08-29 10:39:37 +02:00
2024-09-27 08:18:43 -07:00