diff options
author | Nikolai Kondrashov <spbnick@gmail.com> | 2022-05-08 18:01:42 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-05-11 14:19:27 +0200 |
commit | caf7e93479c73374a9fcad29f90477280444584e (patch) | |
tree | 60b48b94a083b106b656db8658086d3fdbe1254e /drivers/hid/hid-uclogic-core.c | |
parent | 945d5dd5a5f88b99c090d80948f589416e2ceb37 (diff) |
HID: uclogic: Do not focus on touch ring only
Accommodate both touch ring and touch strip in naming throughout
hid-uclogic by talking about abstract "touch" instead of "touch ring",
wherever possible.
Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-uclogic-core.c')
-rw-r--r-- | drivers/hid/hid-uclogic-core.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/hid/hid-uclogic-core.c b/drivers/hid/hid-uclogic-core.c index 8cac5944e63f..cc53625ed1f7 100644 --- a/drivers/hid/hid-uclogic-core.c +++ b/drivers/hid/hid-uclogic-core.c @@ -134,7 +134,7 @@ static int uclogic_input_configured(struct hid_device *hdev, * Disable EV_MSC reports for touch ring interfaces to * make the Wacom driver pickup touch ring extents */ - if (frame->touch_ring_byte > 0) + if (frame->touch_byte > 0) __clear_bit(EV_MSC, hi->input->evbit); } } @@ -351,9 +351,8 @@ static int uclogic_raw_event_frame( /* If need to, and can, set pad device ID for Wacom drivers */ if (frame->dev_id_byte > 0 && frame->dev_id_byte < size) { /* If we also have a touch ring and the finger left it */ - if (frame->touch_ring_byte > 0 && - frame->touch_ring_byte < size && - data[frame->touch_ring_byte] == 0) { + if (frame->touch_byte > 0 && frame->touch_byte < size && + data[frame->touch_byte] == 0) { data[frame->dev_id_byte] = 0; } else { data[frame->dev_id_byte] = 0xf; @@ -387,16 +386,15 @@ static int uclogic_raw_event_frame( } /* If need to, and can, transform the touch ring reports */ - if (frame->touch_ring_byte > 0 && frame->touch_ring_byte < size && - frame->touch_ring_flip_at != 0) { - __s8 value = data[frame->touch_ring_byte]; - + if (frame->touch_byte > 0 && frame->touch_byte < size && + frame->touch_flip_at != 0) { + __s8 value = data[frame->touch_byte]; if (value != 0) { - value = frame->touch_ring_flip_at - value; + value = frame->touch_flip_at - value; if (value < 0) - value = frame->touch_ring_max + value; + value = frame->touch_max + value; - data[frame->touch_ring_byte] = value; + data[frame->touch_byte] = value; } } |