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