Lines Matching +full:touchscreen +full:- +full:inverted +full:- +full:x
1 // SPDX-License-Identifier: GPL-2.0-only
3 * HTC Shift touchscreen driver
21 MODULE_DESCRIPTION("HTC Shift touchscreen driver");
42 MODULE_PARM_DESC(invert_x, "If set, X axis is inverted");
45 MODULE_PARM_DESC(invert_y, "If set, Y axis is inverted");
50 unsigned short x, y, xy; in htcpen_interrupt() local
59 x = inb_p(HTCPEN_PORT_DATA); in htcpen_interrupt()
67 /* get high resolution value of X and Y using LSB */ in htcpen_interrupt()
68 x = X_AXIS_MAX - ((x * 8) + ((xy >> 4) & 0xf)); in htcpen_interrupt()
71 x = X_AXIS_MAX - x; in htcpen_interrupt()
73 y = Y_AXIS_MAX - y; in htcpen_interrupt()
75 if (x != X_AXIS_MAX && x != 0) { in htcpen_interrupt()
77 input_report_abs(htcpen_dev, ABS_X, x); in htcpen_interrupt()
105 int err = -EBUSY; in htcpen_isa_probe()
108 printk(KERN_ERR "htcpen: unable to get IO region 0x%x\n", in htcpen_isa_probe()
114 printk(KERN_ERR "htcpen: unable to get IO region 0x%x\n", in htcpen_isa_probe()
120 printk(KERN_ERR "htcpen: unable to get IO region 0x%x\n", in htcpen_isa_probe()
128 err = -ENOMEM; in htcpen_isa_probe()
132 htcpen_dev->name = "HTC Shift EC TouchScreen"; in htcpen_isa_probe()
133 htcpen_dev->id.bustype = BUS_ISA; in htcpen_isa_probe()
135 htcpen_dev->evbit[0] = BIT_MASK(EV_ABS) | BIT_MASK(EV_KEY); in htcpen_isa_probe()
136 htcpen_dev->keybit[BIT_WORD(BTN_TOUCH)] = BIT_MASK(BTN_TOUCH); in htcpen_isa_probe()
140 htcpen_dev->open = htcpen_open; in htcpen_isa_probe()
141 htcpen_dev->close = htcpen_close; in htcpen_isa_probe()
232 return -ENODEV; in htcpen_isa_init()