Lines Matching refs:dev
150 struct input_dev *dev = w8001->touch_dev;
159 input_mt_slot(dev, i);
160 input_mt_report_slot_state(dev, MT_TOOL_FINGER, touch);
169 input_report_abs(dev, ABS_MT_POSITION_X, x);
170 input_report_abs(dev, ABS_MT_POSITION_Y, y);
182 input_mt_report_pointer_emulation(dev, true);
185 input_sync(dev);
216 struct input_dev *dev = w8001->pen_dev;
222 * - if dev is already in proximity and f2 is toggled → pen + side2
223 * - if dev comes into proximity with f2 set → eraser
231 input_report_abs(dev, ABS_PRESSURE, 0);
232 input_report_key(dev, BTN_TOUCH, 0);
233 input_report_key(dev, BTN_STYLUS, 0);
234 input_report_key(dev, BTN_STYLUS2, 0);
235 input_report_key(dev, BTN_TOOL_RUBBER, 0);
236 input_sync(dev);
247 input_report_key(dev, BTN_STYLUS2, coord->f2);
251 input_report_abs(dev, ABS_X, coord->x);
252 input_report_abs(dev, ABS_Y, coord->y);
253 input_report_abs(dev, ABS_PRESSURE, coord->pen_pressure);
254 input_report_key(dev, BTN_TOUCH, coord->tsw);
255 input_report_key(dev, BTN_STYLUS, coord->f1);
256 input_report_key(dev, w8001->type, coord->rdy);
257 input_sync(dev);
265 struct input_dev *dev = w8001->touch_dev;
272 input_report_abs(dev, ABS_X, x);
273 input_report_abs(dev, ABS_Y, y);
274 input_report_key(dev, BTN_TOUCH, coord->tsw);
276 input_sync(dev);
378 static int w8001_open(struct input_dev *dev)
380 struct w8001 *w8001 = input_get_drvdata(dev);
397 static void w8001_close(struct input_dev *dev)
399 struct w8001 *w8001 = input_get_drvdata(dev);
425 struct input_dev *dev = w8001->pen_dev;
434 __set_bit(EV_KEY, dev->evbit);
435 __set_bit(EV_ABS, dev->evbit);
436 __set_bit(BTN_TOUCH, dev->keybit);
437 __set_bit(BTN_TOOL_PEN, dev->keybit);
438 __set_bit(BTN_TOOL_RUBBER, dev->keybit);
439 __set_bit(BTN_STYLUS, dev->keybit);
440 __set_bit(BTN_STYLUS2, dev->keybit);
441 __set_bit(INPUT_PROP_DIRECT, dev->propbit);
447 input_set_abs_params(dev, ABS_X, 0, coord.x, 0, 0);
448 input_set_abs_params(dev, ABS_Y, 0, coord.y, 0, 0);
449 input_abs_set_res(dev, ABS_X, W8001_PEN_RESOLUTION);
450 input_abs_set_res(dev, ABS_Y, W8001_PEN_RESOLUTION);
451 input_set_abs_params(dev, ABS_PRESSURE, 0, coord.pen_pressure, 0, 0);
453 input_set_abs_params(dev, ABS_TILT_X, 0, coord.tilt_x, 0, 0);
454 input_set_abs_params(dev, ABS_TILT_Y, 0, coord.tilt_y, 0, 0);
466 struct input_dev *dev = w8001->touch_dev;
482 __set_bit(EV_KEY, dev->evbit);
483 __set_bit(EV_ABS, dev->evbit);
484 __set_bit(BTN_TOUCH, dev->keybit);
485 __set_bit(INPUT_PROP_DIRECT, dev->propbit);
498 input_set_abs_params(dev, ABS_X, 0, touch.x, 0, 0);
499 input_set_abs_params(dev, ABS_Y, 0, touch.y, 0, 0);
500 input_abs_set_res(dev, ABS_X, touch.panel_res);
501 input_abs_set_res(dev, ABS_Y, touch.panel_res);
522 __set_bit(BTN_TOOL_DOUBLETAP, dev->keybit);
523 error = input_mt_init_slots(dev, 2, 0);
525 dev_err(&w8001->serio->dev,
530 input_set_abs_params(dev, ABS_MT_POSITION_X,
532 input_set_abs_params(dev, ABS_MT_POSITION_Y,
534 input_set_abs_params(dev, ABS_MT_TOOL_TYPE,
536 input_abs_set_res(dev, ABS_MT_POSITION_X, touch.panel_res);
537 input_abs_set_res(dev, ABS_MT_POSITION_Y, touch.panel_res);
552 static void w8001_set_devdata(struct input_dev *dev, struct w8001 *w8001,
555 dev->phys = w8001->phys;
556 dev->id.bustype = BUS_RS232;
557 dev->id.product = w8001->id;
558 dev->id.vendor = 0x056a;
559 dev->id.version = 0x0100;
560 dev->open = w8001_open;
561 dev->close = w8001_close;
563 dev->dev.parent = &serio->dev;
565 input_set_drvdata(dev, w8001);