Lines Matching +full:0 +full:- +full:127
4 * Copyright (c) 2000-2002 Vojtech Pavlik
46 nx = joy0dat & 0xff; in amimouse_interrupt()
49 dx = nx - amimouse_lastx; in amimouse_interrupt()
50 dy = ny - amimouse_lasty; in amimouse_interrupt()
52 if (dx < -127) dx = (256 + nx) - amimouse_lastx; in amimouse_interrupt()
53 if (dx > 127) dx = (nx - 256) - amimouse_lastx; in amimouse_interrupt()
54 if (dy < -127) dy = (256 + ny) - amimouse_lasty; in amimouse_interrupt()
55 if (dy > 127) dy = (ny - 256) - amimouse_lasty; in amimouse_interrupt()
65 input_report_key(dev, BTN_LEFT, ciaa.pra & 0x40); in amimouse_interrupt()
66 input_report_key(dev, BTN_MIDDLE, potgor & 0x0100); in amimouse_interrupt()
67 input_report_key(dev, BTN_RIGHT, potgor & 0x0400); in amimouse_interrupt()
81 amimouse_lastx = joy0dat & 0xff; in amimouse_open()
84 error = request_irq(IRQ_AMIGA_VERTB, amimouse_interrupt, 0, "amimouse", in amimouse_open()
87 dev_err(&dev->dev, "Can't allocate irq %d\n", IRQ_AMIGA_VERTB); in amimouse_open()
104 return -ENOMEM; in amimouse_probe()
106 dev->name = pdev->name; in amimouse_probe()
107 dev->phys = "amimouse/input0"; in amimouse_probe()
108 dev->id.bustype = BUS_AMIGA; in amimouse_probe()
109 dev->id.vendor = 0x0001; in amimouse_probe()
110 dev->id.product = 0x0002; in amimouse_probe()
111 dev->id.version = 0x0100; in amimouse_probe()
113 dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in amimouse_probe()
114 dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); in amimouse_probe()
115 dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | in amimouse_probe()
117 dev->open = amimouse_open; in amimouse_probe()
118 dev->close = amimouse_close; in amimouse_probe()
119 dev->dev.parent = &pdev->dev; in amimouse_probe()
129 return 0; in amimouse_probe()
137 return 0; in amimouse_remove()
143 .name = "amiga-mouse",
149 MODULE_ALIAS("platform:amiga-mouse");