Lines Matching defs:input

15 #include <linux/input.h>
16 #include <linux/input/mt.h>
149 struct input_dev *input;
385 * Clear touch input event status
393 input_mt_slot(ts->input, i);
394 input_mt_report_slot_inactive(ts->input);
399 input_report_key(ts->input, ts->key_code[i], 0);
401 input_sync(ts->input);
457 input_event(ts->input, EV_MSC, MSC_SCAN, keycode);
458 input_report_key(ts->input, keycode, down);
528 input_mt_slot(ts->input, id);
529 if (input_mt_report_slot_state(ts->input,
532 input_report_abs(ts->input, ABS_MT_POSITION_X, x);
533 input_report_abs(ts->input, ABS_MT_POSITION_Y, y);
534 input_report_abs(ts->input, ABS_MT_PRESSURE, pressure);
535 input_report_abs(ts->input, ABS_MT_TOUCH_MAJOR, touch_major);
536 input_report_abs(ts->input, ABS_MT_TOUCH_MINOR, touch_minor);
540 input_mt_sync_frame(ts->input);
564 /* Report input event */
631 input_sync(ts->input);
1143 input_set_abs_params(ts->input, ABS_MT_POSITION_X, 0, ts->max_x, 0, 0);
1144 input_set_abs_params(ts->input, ABS_MT_POSITION_Y, 0, ts->max_y, 0, 0);
1145 input_set_abs_params(ts->input, ABS_X, 0, ts->max_x, 0, 0);
1146 input_set_abs_params(ts->input, ABS_Y, 0, ts->max_y, 0, 0);
1147 input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->ppm_x);
1148 input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->ppm_y);
1149 input_abs_set_res(ts->input, ABS_X, ts->ppm_x);
1150 input_abs_set_res(ts->input, ABS_Y, ts->ppm_y);
1259 if (input_device_enabled(ts->input)) {
1279 if (input_device_enabled(ts->input))
1305 * Take input mutex to prevent racing with itself and also with
1309 mutex_lock(&ts->input->mutex);
1313 mutex_unlock(&ts->input->mutex);
1337 mutex_lock(&ts->input->mutex);
1343 mutex_unlock(&ts->input->mutex);
1359 mutex_lock(&ts->input->mutex);
1368 mutex_unlock(&ts->input->mutex);
1383 mutex_lock(&ts->input->mutex);
1387 mutex_unlock(&ts->input->mutex);
1402 mutex_lock(&ts->input->mutex);
1407 mutex_unlock(&ts->input->mutex);
1430 struct input_dev *input;
1442 input = devm_input_allocate_device(&client->dev);
1443 if (!input)
1447 ts->input = input;
1465 input->name = "MELFAS MIP4 Touchscreen";
1466 input->phys = ts->phys;
1468 input->id.bustype = BUS_I2C;
1469 input->id.vendor = 0x13c5;
1470 input->id.product = ts->product_id;
1472 input->open = mip4_input_open;
1473 input->close = mip4_input_close;
1475 input_set_drvdata(input, ts);
1477 input->keycode = ts->key_code;
1478 input->keycodesize = sizeof(*ts->key_code);
1479 input->keycodemax = ts->key_num;
1481 input_set_abs_params(input, ABS_MT_TOOL_TYPE, 0, MT_TOOL_PALM, 0, 0);
1482 input_set_abs_params(input, ABS_MT_POSITION_X, 0, ts->max_x, 0, 0);
1483 input_set_abs_params(input, ABS_MT_POSITION_Y, 0, ts->max_y, 0, 0);
1484 input_set_abs_params(input, ABS_MT_PRESSURE,
1486 input_set_abs_params(input, ABS_MT_TOUCH_MAJOR,
1488 input_set_abs_params(input, ABS_MT_TOUCH_MINOR,
1490 input_abs_set_res(ts->input, ABS_MT_POSITION_X, ts->ppm_x);
1491 input_abs_set_res(ts->input, ABS_MT_POSITION_Y, ts->ppm_y);
1493 error = input_mt_init_slots(input, MIP4_MAX_FINGERS, INPUT_MT_DIRECT);
1510 error = input_register_device(input);
1513 "Failed to register input device: %d\n", error);
1531 struct input_dev *input = ts->input;
1533 mutex_lock(&input->mutex);
1537 else if (input_device_enabled(input))
1540 mutex_unlock(&input->mutex);
1549 struct input_dev *input = ts->input;
1551 mutex_lock(&input->mutex);
1555 else if (input_device_enabled(input))
1558 mutex_unlock(&input->mutex);