Lines Matching full:touch

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