From 400ae84eb1552a7a6f171bd3fde515ffd17dcee1 Mon Sep 17 00:00:00 2001 From: John Ratke Date: Thu, 16 Jan 2020 15:25:32 -0600 Subject: [PATCH] Change dt-gesture sensor to SPECIAL_REPORTING mode dt-gesture sensor was previously an ON_CHANGE sensor. This is generally okay, but it can lead to the Sensor Service sending out an old event to a new (second, third, etc..) client if there was already a previous client registered for the sensor, and this is not the behavior that is desired. Change-Id: I3bc91c5271fedc83b11ee5028980cfea99dd6732 Reviewed-on: https://gerrit.mot.com/1484754 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Konstantin Makariev Submit-Approved: Jira Key --- .../touchscreen/focaltech_0flash_mmi/focaltech_gesture.c | 4 ++-- drivers/input/touchscreen/goodix_gtx8_mmi/goodix_ts_gesture.c | 2 ++ drivers/input/touchscreen/himax_v2_mmi/himax_common.c | 4 ++-- drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c | 4 ++-- .../touchscreen/touchscreen_mmi/touchscreen_mmi_gesture.c | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c index dbf91e8ea228..b341580e18ed 100755 --- a/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c +++ b/drivers/input/touchscreen/focaltech_0flash_mmi/focaltech_gesture.c @@ -113,8 +113,8 @@ static struct sensors_classdev __maybe_unused sensors_touch_cdev = { .sensor_power = "1", .min_delay = 0, .max_delay = 0, - /* WAKE_UP & ON_CHANGE */ - .flags = 1 | 2, + /* WAKE_UP & SPECIAL_REPORT */ + .flags = 1 | 6, .fifo_reserved_event_count = 0, .fifo_max_event_count = 0, .enabled = 0, diff --git a/drivers/input/touchscreen/goodix_gtx8_mmi/goodix_ts_gesture.c b/drivers/input/touchscreen/goodix_gtx8_mmi/goodix_ts_gesture.c index 6c94a5494ab3..9b1b18def855 100644 --- a/drivers/input/touchscreen/goodix_gtx8_mmi/goodix_ts_gesture.c +++ b/drivers/input/touchscreen/goodix_gtx8_mmi/goodix_ts_gesture.c @@ -57,6 +57,8 @@ static struct sensors_classdev __maybe_unused sensors_touch_cdev = { .sensor_power = "1", .min_delay = -1, .max_delay = 0, + /* WAKE_UP & SPECIAL_REPORT */ + .flags = 1 | 6, .fifo_reserved_event_count = 0, .fifo_max_event_count = 0, .enabled = 0, diff --git a/drivers/input/touchscreen/himax_v2_mmi/himax_common.c b/drivers/input/touchscreen/himax_v2_mmi/himax_common.c index a28c4a10b6ea..0911109c5deb 100644 --- a/drivers/input/touchscreen/himax_v2_mmi/himax_common.c +++ b/drivers/input/touchscreen/himax_v2_mmi/himax_common.c @@ -74,8 +74,8 @@ static struct sensors_classdev __maybe_unused sensors_touch_cdev = { .sensor_power = "1", .min_delay = 0, .max_delay = 0, - /* WAKE_UP & ON_CHANGE */ - .flags = 1 | 2, + /* WAKE_UP & SPECIAL_REPORT */ + .flags = 1 | 6, .fifo_reserved_event_count = 0, .fifo_max_event_count = 0, .enabled = 0, diff --git a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c index 8a0e9f1324eb..916c9856c187 100644 --- a/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c +++ b/drivers/input/touchscreen/nova_0flash_mmi/nt36xxx.c @@ -66,8 +66,8 @@ static struct sensors_classdev __maybe_unused sensors_touch_cdev = { .sensor_power = "1", .min_delay = 0, .max_delay = 0, - /* WAKE_UP & ON_CHANGE */ - .flags = 1 | 2, + /* WAKE_UP & SPECIAL_REPORT */ + .flags = 1 | 6, .fifo_reserved_event_count = 0, .fifo_max_event_count = 0, .enabled = 0, diff --git a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_gesture.c b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_gesture.c index 1bf7f3cf3dbd..40b7acad3a35 100644 --- a/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_gesture.c +++ b/drivers/input/touchscreen/touchscreen_mmi/touchscreen_mmi_gesture.c @@ -88,8 +88,8 @@ static struct sensors_classdev __maybe_unused sensors_touch_cdev = { .sensor_power = "1", .min_delay = 0, .max_delay = 0, - /* WAKE_UP & ON_CHANGE */ - .flags = 1 | 2, + /* WAKE_UP & SPECIAL_REPORT */ + .flags = 1 | 6, .fifo_reserved_event_count = 0, .fifo_max_event_count = 0, .enabled = 0,