16 #include <linux/input.h>
20 static void pcspkr_do_sound(
unsigned int count)
30 outb_p(count & 0xff, 0x42);
31 outb((count >> 8) & 0xff, 0x42);
50 unsigned int count = 0;
72 if (value > 20 && value < 32767)
75 pcspkr_do_sound(count);
84 struct input_dev *input_dev = input_allocate_device();
88 input_dev->name =
"PC Speaker";
89 input_dev->phys =
"isa0061/input0";
90 input_dev->id.bustype =
BUS_ISA;
91 input_dev->id.vendor = 0x001f;
92 input_dev->id.product = 0x0001;
93 input_dev->id.version = 0x0100;
94 input_dev->dev.parent =
dev;
98 input_dev->event = pcspkr_input_event;
100 err = input_register_device(input_dev);
102 input_free_device(input_dev);
113 input_unregister_device(dev);