Lines Matching full:touch
50 /* Touch type */
160 static void mms114_process_mt(struct mms114_data *data, struct mms114_touch *touch) in mms114_process_mt() argument
168 if (touch->id > MMS114_MAX_TOUCH) { in mms114_process_mt()
169 dev_err(&client->dev, "Wrong touch id (%d)\n", touch->id); in mms114_process_mt()
173 id = touch->id - 1; in mms114_process_mt()
174 x = touch->x_lo | touch->x_hi << 8; in mms114_process_mt()
175 y = touch->y_lo | touch->y_hi << 8; in mms114_process_mt()
179 id, touch->type, touch->pressed, in mms114_process_mt()
180 x, y, touch->width, touch->strength); in mms114_process_mt()
183 input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, touch->pressed); in mms114_process_mt()
185 if (touch->pressed) { in mms114_process_mt()
187 input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, touch->width); in mms114_process_mt()
188 input_report_abs(input_dev, ABS_MT_PRESSURE, touch->strength); in mms114_process_mt()
193 struct mms114_touch *touch) in mms114_process_touchkey() argument
199 if (touch->id == 0) in mms114_process_touchkey()
202 if (touch->id > data->num_keycodes) { in mms114_process_touchkey()
203 dev_err(&client->dev, "Wrong touch id for touchkey (%d)\n", in mms114_process_touchkey()
204 touch->id); in mms114_process_touchkey()
208 keycode_id = touch->id - 1; in mms114_process_touchkey()
210 touch->pressed); in mms114_process_touchkey()
212 input_report_key(input_dev, data->keycodes[keycode_id], touch->pressed); in mms114_process_touchkey()
220 struct mms114_touch touch[MMS114_MAX_TOUCH]; in mms114_interrupt() local
244 (u8 *)touch); in mms114_interrupt()
249 switch (touch[index].type) { in mms114_interrupt()
251 mms114_process_mt(data, touch + index); in mms114_interrupt()
255 mms114_process_touchkey(data, touch + index); in mms114_interrupt()
259 dev_err(&client->dev, "Wrong touch type (%d)\n", in mms114_interrupt()
260 touch[index].type); in mms114_interrupt()
640 /* Release all touch */ in mms114_suspend()