Lines Matching +full:x +full:- +full:axis

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Sahara TouchIT-213 serial touchscreen driver
5 * Copyright (c) 2007-2008 Claudio Nieder <private@claudio.ch>
21 #define DRIVER_DESC "Sahara TouchIT-213 serial touchscreen driver"
35 * +--------+ +--------+ +--------+ +--------+ +--------+
37 * +--------+ +--------+ +--------+ +--------+ +--------+
45 * presented, x is the horizontal axis with values growing from left to
46 * right and y is the vertical axis with values growing from top to
50 * correct position, x ist the vertical axis with values growing from
51 * top to bottom and y is the horizontal axis with values growing from
60 * On my Sahara Touch-IT 213 I have observed x values from 0 to 0x7f0
70 * Per-touchscreen data.
86 struct input_dev *dev = touchit213->dev; in touchit213_interrupt()
88 touchit213->data[touchit213->idx] = data; in touchit213_interrupt()
90 switch (touchit213->idx++) { in touchit213_interrupt()
92 if ((touchit213->data[0] & T213_FORMAT_STATUS_MASK) != in touchit213_interrupt()
94 pr_debug("unsynchronized data: 0x%02x\n", data); in touchit213_interrupt()
95 touchit213->idx = 0; in touchit213_interrupt()
100 touchit213->idx = 0; in touchit213_interrupt()
102 (touchit213->data[1] << 7) | touchit213->data[2]); in touchit213_interrupt()
104 (touchit213->data[3] << 7) | touchit213->data[4]); in touchit213_interrupt()
106 touchit213->data[0] & T213_FORMAT_TOUCH_BIT); in touchit213_interrupt()
122 input_get_device(touchit213->dev); in touchit213_disconnect()
123 input_unregister_device(touchit213->dev); in touchit213_disconnect()
126 input_put_device(touchit213->dev); in touchit213_disconnect()
145 err = -ENOMEM; in touchit213_connect()
149 touchit213->serio = serio; in touchit213_connect()
150 touchit213->dev = input_dev; in touchit213_connect()
151 snprintf(touchit213->phys, sizeof(touchit213->phys), in touchit213_connect()
152 "%s/input0", serio->phys); in touchit213_connect()
154 input_dev->name = "Sahara Touch-iT213 Serial TouchScreen"; in touchit213_connect()
155 input_dev->phys = touchit213->phys; in touchit213_connect()
156 input_dev->id.bustype = BUS_RS232; in touchit213_connect()
157 input_dev->id.vendor = SERIO_TOUCHIT213; in touchit213_connect()
158 input_dev->id.product = 0; in touchit213_connect()
159 input_dev->id.version = 0x0100; in touchit213_connect()
160 input_dev->dev.parent = &serio->dev; in touchit213_connect()
161 input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); in touchit213_connect()
162 input_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); in touchit213_connect()
163 input_set_abs_params(touchit213->dev, ABS_X, in touchit213_connect()
165 input_set_abs_params(touchit213->dev, ABS_Y, in touchit213_connect()
174 err = input_register_device(touchit213->dev); in touchit213_connect()