Lines Matching refs:input_dev
65 struct input_dev *input_dev;
163 struct input_dev *input_dev = data->input_dev;
182 input_mt_slot(input_dev, id);
183 input_mt_report_slot_state(input_dev, MT_TOOL_FINGER, touch->pressed);
186 touchscreen_report_pos(input_dev, &data->props, x, y, true);
187 input_report_abs(input_dev, ABS_MT_TOUCH_MAJOR, touch->width);
188 input_report_abs(input_dev, ABS_MT_PRESSURE, touch->strength);
196 struct input_dev *input_dev = data->input_dev;
212 input_report_key(input_dev, data->keycodes[keycode_id], touch->pressed);
219 struct input_dev *input_dev = data->input_dev;
226 mutex_lock(&input_dev->mutex);
227 if (!input_device_enabled(input_dev)) {
228 mutex_unlock(&input_dev->mutex);
231 mutex_unlock(&input_dev->mutex);
265 input_mt_report_pointer_emulation(data->input_dev, true);
266 input_sync(data->input_dev);
435 static int mms114_input_open(struct input_dev *dev)
442 static void mms114_input_close(struct input_dev *dev)
482 struct input_dev *input_dev;
494 input_dev = devm_input_allocate_device(&client->dev);
495 if (!data || !input_dev) {
501 data->input_dev = input_dev;
537 input_dev->keycode = data->keycodes;
538 input_dev->keycodemax = data->num_keycodes;
539 input_dev->keycodesize = sizeof(data->keycodes[0]);
541 input_set_capability(input_dev,
545 input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_X);
546 input_set_capability(input_dev, EV_ABS, ABS_MT_POSITION_Y);
547 input_set_abs_params(input_dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
548 input_set_abs_params(input_dev, ABS_MT_TOUCH_MAJOR,
551 touchscreen_parse_properties(input_dev, true, &data->props);
559 input_set_abs_params(input_dev, ABS_MT_POSITION_X,
561 input_set_abs_params(input_dev, ABS_MT_POSITION_Y,
571 data->moving_threshold = input_abs_get_fuzz(input_dev,
573 data->contact_threshold = input_abs_get_fuzz(input_dev,
575 input_abs_set_fuzz(input_dev, ABS_MT_POSITION_X, 0);
576 input_abs_set_fuzz(input_dev, ABS_MT_POSITION_Y, 0);
577 input_abs_set_fuzz(input_dev, ABS_MT_PRESSURE, 0);
580 input_dev->name = devm_kasprintf(&client->dev, GFP_KERNEL,
583 if (!input_dev->name)
586 input_dev->id.bustype = BUS_I2C;
587 input_dev->dev.parent = &client->dev;
588 input_dev->open = mms114_input_open;
589 input_dev->close = mms114_input_close;
591 error = input_mt_init_slots(input_dev, MMS114_MAX_TOUCH,
596 input_set_drvdata(input_dev, data);
624 error = input_register_device(data->input_dev);
637 struct input_dev *input_dev = data->input_dev;
642 input_mt_slot(input_dev, id);
643 input_mt_report_slot_inactive(input_dev);
646 input_mt_report_pointer_emulation(input_dev, true);
647 input_sync(input_dev);
649 mutex_lock(&input_dev->mutex);
650 if (input_device_enabled(input_dev))
652 mutex_unlock(&input_dev->mutex);
661 struct input_dev *input_dev = data->input_dev;
664 mutex_lock(&input_dev->mutex);
665 if (input_device_enabled(input_dev)) {
668 mutex_unlock(&input_dev->mutex);
672 mutex_unlock(&input_dev->mutex);