43 #include <linux/module.h>
45 #include <linux/input.h>
82 static unsigned char atakbd_keycode[0x72] = {
193 static struct input_dev *atakbd_dev;
195 static void atakbd_interrupt(
unsigned char scancode,
char down)
198 if (scancode < 0x72) {
202 scancode = atakbd_keycode[scancode];
205 input_report_key(atakbd_dev, scancode, 1);
206 input_report_key(atakbd_dev, scancode, 0);
207 input_sync(atakbd_dev);
209 input_report_key(atakbd_dev, scancode, down);
210 input_sync(atakbd_dev);
218 static int __init atakbd_init(
void)
230 atakbd_dev = input_allocate_device();
234 atakbd_dev->name =
"Atari Keyboard";
235 atakbd_dev->phys =
"atakbd/input0";
237 atakbd_dev->id.vendor = 0x0001;
238 atakbd_dev->id.product = 0x0001;
239 atakbd_dev->id.version = 0x0100;
242 atakbd_dev->keycode = atakbd_keycode;
243 atakbd_dev->keycodesize =
sizeof(
unsigned char);
244 atakbd_dev->keycodemax =
ARRAY_SIZE(atakbd_keycode);
246 for (i = 1; i < 0x72; i++) {
247 set_bit(atakbd_keycode[i], atakbd_dev->keybit);
251 error = input_register_device(atakbd_dev);
253 input_free_device(atakbd_dev);
262 static void __exit atakbd_exit(
void)
265 input_unregister_device(atakbd_dev);