diff options
author | Super Liu <supercjliu@google.com> | 2022-07-19 09:48:27 +0800 |
---|---|---|
committer | Mark Chang <changmark@google.com> | 2022-07-25 12:12:05 +0000 |
commit | c176212c241692a2da31f5758722a2c69910fc26 (patch) | |
tree | e1db4c60489721a4cf6185308604862d3daf191e /goog_touch_interface.c | |
parent | 577435a521d323c881164a0441d5d584490a4259 (diff) | |
download | common-c176212c241692a2da31f5758722a2c69910fc26.tar.gz |
touch/gti: support touch cancel reporting by MT_TOOL_PALM.
device 2: /dev/input/event2
events:
ABS_MT_TOOL_TYPE: value 0, min 0, max 2, fuzz 0, flat 0, resolution 0
Bug: 201610482
Test: check the result by getevent -lp
Signed-off-by: Super Liu <supercjliu@google.com>
Change-Id: I54326dc98328c25c9aecf81fc3fe289bc739ba3b
Diffstat (limited to 'goog_touch_interface.c')
-rw-r--r-- | goog_touch_interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index aabbfe1..ea4146c 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -1471,7 +1471,8 @@ int goog_offload_probe(struct goog_touch_interface *gti) gti->offload.caps.continuous_reporting = true; gti->offload.caps.noise_reporting = false; - gti->offload.caps.cancel_reporting = false; + gti->offload.caps.cancel_reporting = + of_property_read_bool(np, "goog,offload-caps-cancel-reporting"); gti->offload.caps.size_reporting = true; gti->offload.caps.filter_grip = true; gti->offload.caps.filter_palm = true; @@ -2281,6 +2282,11 @@ struct goog_touch_interface *goog_touch_interface_probe( INIT_KFIFO(gti->debug_fifo); for (i = 0 ; i < MAX_SLOTS ; i++) gti->debug_input[i].slot = i; + /* + * Initialize the ABS_MT_TOOL_TYPE to support touch cancel. + */ + input_set_abs_params(input_dev, ABS_MT_TOOL_TYPE, + MT_TOOL_FINGER, MT_TOOL_PALM, 0, 0); } if (!gti_class) |