From 203765113a7ea91c8f56e72651d124af91e39caa Mon Sep 17 00:00:00 2001 From: Josh Thielen Date: Tue, 5 Sep 2023 16:25:56 +0000 Subject: petc_input_filter: Limit PETC input filter to non-PnP devices Bug: 298090082 (cherry picked from https://partner-android-review.googlesource.com/q/commit:72cf9042983141acac115c63ab181eb8b6e011cf) Merged-In: Ic58eb5d5a95e1984c9d54fc68cc739e4eabe34c5 Change-Id: Ic58eb5d5a95e1984c9d54fc68cc739e4eabe34c5 --- petc_input_filter/petc_input_filter.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/petc_input_filter/petc_input_filter.c b/petc_input_filter/petc_input_filter.c index 5cb4611..584701a 100644 --- a/petc_input_filter/petc_input_filter.c +++ b/petc_input_filter/petc_input_filter.c @@ -373,6 +373,17 @@ static bool petc_if_match(struct input_handler *handler, struct input_dev *dev) return false; } + if (dev->id.bustype != 0) { + /* TODO: b/299198389 + * + * We were matching a PnP device and filtering when we shouldn't have. + * This is a temporary workaround since the devices we do want are + * bustype 0. This should be cleaned up with device tree entries to be + * more robust and cleaner. + */ + return false; + } + if (test_bit(EV_ABS, dev->evbit)) { /* Don't match on a touch device */ return false; -- cgit v1.2.3