Lines Matching refs:atamouse_dev
61 static struct input_dev *atamouse_dev; variable
77 input_report_rel(atamouse_dev, REL_X, dx); in atamouse_interrupt()
78 input_report_rel(atamouse_dev, REL_Y, dy); in atamouse_interrupt()
80 input_report_key(atamouse_dev, BTN_LEFT, buttons & 0x4); in atamouse_interrupt()
81 input_report_key(atamouse_dev, BTN_MIDDLE, buttons & 0x2); in atamouse_interrupt()
82 input_report_key(atamouse_dev, BTN_RIGHT, buttons & 0x1); in atamouse_interrupt()
84 input_sync(atamouse_dev); in atamouse_interrupt()
119 atamouse_dev = input_allocate_device(); in atamouse_init()
120 if (!atamouse_dev) in atamouse_init()
123 atamouse_dev->name = "Atari mouse"; in atamouse_init()
124 atamouse_dev->phys = "atamouse/input0"; in atamouse_init()
125 atamouse_dev->id.bustype = BUS_HOST; in atamouse_init()
126 atamouse_dev->id.vendor = 0x0001; in atamouse_init()
127 atamouse_dev->id.product = 0x0002; in atamouse_init()
128 atamouse_dev->id.version = 0x0100; in atamouse_init()
130 atamouse_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REL); in atamouse_init()
131 atamouse_dev->relbit[0] = BIT_MASK(REL_X) | BIT_MASK(REL_Y); in atamouse_init()
132 atamouse_dev->keybit[BIT_WORD(BTN_LEFT)] = BIT_MASK(BTN_LEFT) | in atamouse_init()
135 atamouse_dev->open = atamouse_open; in atamouse_init()
136 atamouse_dev->close = atamouse_close; in atamouse_init()
138 error = input_register_device(atamouse_dev); in atamouse_init()
140 input_free_device(atamouse_dev); in atamouse_init()
149 input_unregister_device(atamouse_dev); in atamouse_exit()