diff options
author | Super Liu <supercjliu@google.com> | 2022-12-09 02:32:00 +0000 |
---|---|---|
committer | Super Liu <supercjliu@google.com> | 2022-12-09 02:33:29 +0000 |
commit | 1cd61e8f80a1d7c2d36f2e88c8cd8135aa10e58d (patch) | |
tree | 9f95d8b94a8592d29d46e91016e2c5a7f163ad30 | |
parent | 29c8a14de001456ac622d871f9070a1dfe69ba95 (diff) | |
download | common-1cd61e8f80a1d7c2d36f2e88c8cd8135aa10e58d.tar.gz |
gti: Add logs for unexpected tool_type by vendor driver
Bug: 261924220
Change-Id: I99ace4cb0764330c50f8e9418a3dca0699a86802
Signed-off-by: Super Liu <supercjliu@google.com>
-rw-r--r-- | goog_touch_interface.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/goog_touch_interface.c b/goog_touch_interface.c index 579c8e2..ccf5644 100644 --- a/goog_touch_interface.c +++ b/goog_touch_interface.c @@ -1847,8 +1847,7 @@ void goog_offload_populate_frame(struct goog_touch_interface *gti, } ATRACE_END(); } else { - GOOG_ERR(gti, "%s - unrecognized channel_type = %u\n", - __func__, channel_type); + GOOG_ERR(gti, "unrecognized channel_type %#x.\n", channel_type); } if (ret) { @@ -2264,7 +2263,8 @@ void goog_input_mt_report_slot_state( if (goog_input_legacy_report(gti)) input_mt_report_slot_state(dev, tool_type, active); - if (tool_type == MT_TOOL_FINGER) { + switch (tool_type) { + case MT_TOOL_FINGER: if (active) { gti->offload.coords[gti->slot].status = COORD_STATUS_FINGER; if (!test_and_set_bit(gti->slot, @@ -2278,7 +2278,16 @@ void goog_input_mt_report_slot_state( set_bit(gti->slot, >i->slot_bit_changed); } } + break; + + default: + if (!goog_input_legacy_report(gti)) { + GOOG_WARN(gti, "unexcepted input tool_type(%#x) active(%d)!\n", + tool_type, active); + } + break; } + } EXPORT_SYMBOL(goog_input_mt_report_slot_state); |