diff options
author | 2024-10-28 12:07:50 -0700 | |
---|---|---|
committer | 2024-11-18 21:49:47 +0100 | |
commit | e8a0581914bd2e28f7af8d333ddc73fd78b1ef84 (patch) | |
tree | 990ca72f514e25115da1925198fd42219fa81e72 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | Merge tag 'hid-for-linus-20241105' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid (diff) | |
download | wireguard-linux-e8a0581914bd2e28f7af8d333ddc73fd78b1ef84.tar.xz wireguard-linux-e8a0581914bd2e28f7af8d333ddc73fd78b1ef84.zip |
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>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions