summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAtif Niyaz <atifniyaz@google.com>2019-06-26 13:13:52 -0700
committerWilson Sung <wilsonsung@google.com>2019-08-21 17:44:43 +0800
commit4a41946b322c99e5bfacd024b0b57e04ff0bfae6 (patch)
tree200c423d0e3511693d685825cfa022e2d37c4e8c
parent6797766a34752ef0784bc52a48aadae2595236ec (diff)
downloadfts_touch_s5-4a41946b322c99e5bfacd024b0b57e04ff0bfae6.tar.gz
input: touchscreen: stm: Remove input_event calls for MSC_TIMESTAMP
Context: With the potential new API change to timestamp, it isn't necessary anymore to use the input_event call for MSC_TIMESTAMP. Bug: 139785163 Bug: 119840121 Change-Id: I3bf5f0e6deb7be032155544b30d2994de124ae1e Signed-off-by: atifniyaz@google.com
-rw-r--r--fts.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/fts.c b/fts.c
index 291ce49..f73705e 100644
--- a/fts.c
+++ b/fts.c
@@ -138,15 +138,8 @@ static u8 key_mask; /* /< store the last update of the key mask
static int fts_init_sensing(struct fts_ts_info *info);
static int fts_mode_handler(struct fts_ts_info *info, int force);
-
static int fts_chip_initialization(struct fts_ts_info *info, int init_type);
-static void fts_report_timestamp(struct fts_ts_info *info)
-{
- input_event(info->input_dev, EV_MSC, MSC_TIMESTAMP,
- ktime_to_ns(info->timestamp) / 1000);
-}
-
/**
* Release all the touches in the linux input subsystem
* @param info pointer to fts_ts_info which contains info about device/hw setup
@@ -169,7 +162,6 @@ void release_all_touches(struct fts_ts_info *info)
input_report_abs(info->input_dev, ABS_MT_TRACKING_ID, -1);
}
input_report_key(info->input_dev, BTN_TOUCH, 0);
- fts_report_timestamp(info);
input_sync(info->input_dev);
info->touch_id = 0;
#ifdef STYLUS_MODE
@@ -1522,9 +1514,6 @@ static void touchsim_work(struct work_struct *work)
touchsim_report_contact_event(info->input_dev, TOUCHSIM_SLOT_ID,
touchsim->x, touchsim->y, 1);
- input_event(info->input_dev, EV_MSC, MSC_TIMESTAMP,
- ktime_to_ns(timestamp) / 1000);
-
input_sync(info->input_dev);
heatmap_read(&info->v4l2, ktime_to_ns(timestamp));
@@ -3864,7 +3853,6 @@ static irqreturn_t fts_interrupt_handler(int irq, void *handle)
const unsigned char EVENTS_REMAINING_MASK = 0x1F;
unsigned char events_remaining = 0;
unsigned char *evt_data;
- event_dispatch_handler_t event_handler;
bool processed_pointer_event = false;
/* It is possible that interrupts were disabled while the handler is
@@ -3907,10 +3895,8 @@ static irqreturn_t fts_interrupt_handler(int irq, void *handle)
/* Ensure event ID is within bounds */
if (eventId < NUM_EVT_ID) {
- event_handler =
- info->event_dispatch_table[eventId];
- processed_pointer_event =
- event_handler(info, evt_data);
+ processed_pointer_event = info->event_dispatch_table[eventId](
+ info, evt_data);
}
}
}
@@ -3918,17 +3904,9 @@ static irqreturn_t fts_interrupt_handler(int irq, void *handle)
if (info->touch_id == 0)
input_report_key(info->input_dev, BTN_TOUCH, 0);
- /*
- * Only report timestamp for pointer events and ignore events
- * like errors, status updates, etc.
- * Otherwise, we will generate events that only consist of timestamps.
- */
- if (processed_pointer_event) {
- fts_report_timestamp(info);
- }
input_sync(info->input_dev);
- if (processed_pointer_event)
+ if (processed_pointer_event)
heatmap_read(&info->v4l2, ktime_to_ns(info->timestamp));
/* Disable the firmware motion filter during single touch */
@@ -5485,7 +5463,6 @@ static int fts_probe(struct spi_device *client)
input_set_abs_params(info->input_dev, ABS_MT_DISTANCE, DISTANCE_MIN,
DISTANCE_MAX, 0, 0);
#endif
- input_set_capability(info->input_dev, EV_MSC, MSC_TIMESTAMP);
#ifdef GESTURE_MODE
input_set_capability(info->input_dev, EV_KEY, KEY_WAKEUP);