void __init pckbd_init_hw(void) { if (!kbd_controller_present()) { kbd_exists = 0; return; } kbd_request_region(); /* Flush any pending input. */ kbd_clear_input(); if (kbd_startup_reset) { char *msg = initialize_kbd(); if (msg) printk(KERN_WARNING "initialize_kbd: %s\n", msg); } #if defined CONFIG_PSMOUSE psaux_init(); #endif kbd_rate = pckbd_rate; /* Ok, finally allocate the IRQ, and off we go.. */ kbd_request_irq(keyboard_interrupt); }
void __init init_qtronix_990P_kbd(void) { int retval; cir = (struct cir_port *)kmalloc(sizeof(struct cir_port), GFP_KERNEL); if (!cir) { printk("Unable to initialize Qtronix keyboard\n"); return; } /* * revisit * this should be programmable, somehow by the, by the user. */ cir->port = KBD_CIR_PORT; cir->baud_rate = 0x1d; cir->rdwos = 0; cir->rxdcr = 0x3; cir->hcfs = 0; cir->fifo_tl = 0; cir->cfq = 0x1d; cir_port_init(cir); retval = request_irq(IT8172_CIR0_IRQ, kbd_int_handler, (unsigned long )(SA_INTERRUPT|SA_SHIRQ), (const char *)"Qtronix IR Keyboard", (void *)cir); if (retval) { printk("unable to allocate cir %d irq %d\n", cir->port, IT8172_CIR0_IRQ); } #ifdef CONFIG_PSMOUSE psaux_init(); #endif }
/* * paux device driver INITIALIZE entry point. */ rtems_device_driver paux_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *arg) { rtems_status_code status; /* * Set up TERMIOS */ rtems_termios_initialize(); printk( "PS/2 mouse probe.\n" ); if( psaux_init() < 0 ) { printk("Error detecting PS/2 mouse --\n"); /* we might want to finish the application here !!! */ } open_aux(); /* * Register the device */ status = rtems_io_register_name ("/dev/mouse", major, 0); if (status != RTEMS_SUCCESSFUL) { printk("Error registering paux device!\n"); rtems_fatal_error_occurred (status); } return RTEMS_SUCCESSFUL; } /* tty_initialize */
int __init sa1111_kbd_init_hw(void) { char *msg; int ret; if (!request_mem_region(_KBDCR, 512, "keyboard")) return -EBUSY; SKPCR |= SKPCR_PTCLKEN; KBDCLKDIV = 0; KBDPRECNT = 127; /* Flush any pending input. */ kbd_clear_input(); msg = initialize_kbd(); if (msg) printk(KERN_WARNING "initialize_kbd: %s\n", msg); #if defined CONFIG_PSMOUSE psaux_init(); #endif k_setkeycode = sa1111_setkeycode; k_getkeycode = sa1111_getkeycode; k_translate = sa1111_translate; k_unexpected_up = sa1111_unexpected_up; k_leds = sa1111_leds; #ifdef CONFIG_MAGIC_SYSRQ k_sysrq_xlate = sa1111_sysrq_xlate; k_sysrq_key = 0x54; #endif /* Ok, finally allocate the IRQ, and off we go.. */ ret = request_irq(IRQ_TPRXINT, keyboard_interrupt, 0, "keyboard", NULL); if (ret) release_mem_region(_KBDCR, 512); return ret; }
int init_module(void) { return psaux_init(); /*?? Bjorn */ }