Lines Matching +full:0 +full:- +full:127

1 // SPDX-License-Identifier: GPL-2.0-only
5 * Copyright (c) 2000-2002 Vojtech Pavlik
42 nx = joy0dat & 0xff; in amimouse_interrupt()
45 dx = nx - amimouse_lastx; in amimouse_interrupt()
46 dy = ny - amimouse_lasty; in amimouse_interrupt()
48 if (dx < -127) dx = (256 + nx) - amimouse_lastx; in amimouse_interrupt()
49 if (dx > 127) dx = (nx - 256) - amimouse_lastx; in amimouse_interrupt()
50 if (dy < -127) dy = (256 + ny) - amimouse_lasty; in amimouse_interrupt()
51 if (dy > 127) dy = (ny - 256) - amimouse_lasty; in amimouse_interrupt()
61 input_report_key(dev, BTN_LEFT, ciaa.pra & 0x40); in amimouse_interrupt()
62 input_report_key(dev, BTN_MIDDLE, potgor & 0x0100); in amimouse_interrupt()
63 input_report_key(dev, BTN_RIGHT, potgor & 0x0400); in amimouse_interrupt()
77 amimouse_lastx = joy0dat & 0xff; in amimouse_open()
80 error = request_irq(IRQ_AMIGA_VERTB, amimouse_interrupt, 0, "amimouse", in amimouse_open()
83 dev_err(&dev->dev, "Can't allocate irq %d\n", IRQ_AMIGA_VERTB); in amimouse_open()
100 return -ENOMEM; in amimouse_probe()
102 dev->name = pdev->name; in amimouse_probe()
103 dev->phys = "amimouse/input0"; in amimouse_probe()
104 dev->id.bustype = BUS_AMIGA; in amimouse_probe()
105 dev->id.vendor = 0x0001; in amimouse_probe()
106 dev->id.product = 0x0002; in amimouse_probe()
107 dev->id.version = 0x0100; in amimouse_probe()
109 dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in amimouse_probe()
110 dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); in amimouse_probe()
111 dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | in amimouse_probe()
113 dev->open = amimouse_open; in amimouse_probe()
114 dev->close = amimouse_close; in amimouse_probe()
115 dev->dev.parent = &pdev->dev; in amimouse_probe()
125 return 0; in amimouse_probe()
133 return 0; in amimouse_remove()
139 .name = "amiga-mouse",
145 MODULE_ALIAS("platform:amiga-mouse");