Lines Matching defs:touch

21 /* touch register */
33 /* bit definitions of touch */
50 struct pm860x_touch *touch = data;
51 struct pm860x_chip *chip = touch->chip;
57 ret = pm860x_bulk_read(touch->i2c, MEAS_TSIX_1, MEAS_LEN, buf);
68 if ((x != 0) && (z1 != 0) && (touch->res_x != 0)) {
70 rt = (rt * touch->res_x * x) >> ACCURATE_BIT;
74 input_report_abs(touch->idev, ABS_X, x);
75 input_report_abs(touch->idev, ABS_Y, y);
76 input_report_abs(touch->idev, ABS_PRESSURE, rt);
77 input_report_key(touch->idev, BTN_TOUCH, 1);
80 input_report_abs(touch->idev, ABS_PRESSURE, 0);
81 input_report_key(touch->idev, BTN_TOUCH, 0);
84 input_sync(touch->idev);
92 struct pm860x_touch *touch = input_get_drvdata(dev);
97 ret = pm860x_set_bits(touch->i2c, MEAS_EN3, data, data);
107 struct pm860x_touch *touch = input_get_drvdata(dev);
112 pm860x_set_bits(touch->i2c, MEAS_EN3, data, 0);
126 np = of_get_child_by_name(np, "touch");
128 dev_err(&pdev->dev, "Can't find touch node\n");
182 struct pm860x_touch *touch;
241 touch = devm_kzalloc(&pdev->dev, sizeof(struct pm860x_touch),
243 if (!touch)
246 touch->idev = devm_input_allocate_device(&pdev->dev);
247 if (!touch->idev) {
252 touch->idev->name = "88pm860x-touch";
253 touch->idev->phys = "88pm860x/input0";
254 touch->idev->id.bustype = BUS_I2C;
255 touch->idev->dev.parent = &pdev->dev;
256 touch->idev->open = pm860x_touch_open;
257 touch->idev->close = pm860x_touch_close;
258 touch->chip = chip;
259 touch->i2c = i2c;
260 touch->irq = irq;
261 touch->res_x = res_x;
262 input_set_drvdata(touch->idev, touch);
264 ret = devm_request_threaded_irq(&pdev->dev, touch->irq, NULL,
266 "touch", touch);
270 __set_bit(EV_ABS, touch->idev->evbit);
271 __set_bit(ABS_X, touch->idev->absbit);
272 __set_bit(ABS_Y, touch->idev->absbit);
273 __set_bit(ABS_PRESSURE, touch->idev->absbit);
274 __set_bit(EV_SYN, touch->idev->evbit);
275 __set_bit(EV_KEY, touch->idev->evbit);
276 __set_bit(BTN_TOUCH, touch->idev->keybit);
278 input_set_abs_params(touch->idev, ABS_X, 0, 1 << ACCURATE_BIT, 0, 0);
279 input_set_abs_params(touch->idev, ABS_Y, 0, 1 << ACCURATE_BIT, 0, 0);
280 input_set_abs_params(touch->idev, ABS_PRESSURE, 0, 1 << ACCURATE_BIT,
283 ret = input_register_device(touch->idev);
285 dev_err(chip->dev, "Failed to register touch!\n");
294 .name = "88pm860x-touch",
303 MODULE_ALIAS("platform:88pm860x-touch");