Пример #1
0
int __init qpmouse_init(void)
{
	if (!probe_qp())
		return -EIO;

	printk(KERN_INFO "82C710 type pointing device detected -- driver installed.\n");
/*	printk("82C710 address = %x (should be 0x310)\n", qp_data); */
	qp_present = 1;
	misc_register(&qp_mouse);
	queue = (struct qp_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
	memset(queue, 0, sizeof(*queue));
	queue->head = queue->tail = 0;
	queue->proc_list = NULL;

	return 0;
}
Пример #2
0
int psaux_init(void)
{
	int qp_found = 0;

#ifdef CONFIG_82C710_MOUSE
	if ((qp_found = probe_qp())) {
		printk(KERN_INFO "82C710 type pointing device detected -- driver installed.\n");
/*		printk("82C710 address = %x (should be 0x310)\n", qp_data); */
		qp_present = 1;
		psaux_fops.write = write_qp;
		psaux_fops.open = open_qp;
		psaux_fops.release = release_qp;
	} else
#endif
	if (aux_device_present == 0xaa) {
		printk(KERN_INFO "PS/2 auxiliary pointing device detected -- driver installed.\n");
	 	aux_present = 1;
		kbd_read_mask = AUX_OBUF_FULL;
	} else {
		return -EIO;
	}
	misc_register(&psaux_mouse);
	queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);
	memset(queue, 0, sizeof(*queue));
	queue->head = queue->tail = 0;
	queue->proc_list = NULL;
	if (!qp_found) {
#if defined INITIALIZE_DEVICE
		outb_p(AUX_ENABLE,AUX_COMMAND);		/* Enable Aux */
		aux_write_ack(AUX_SET_SAMPLE);
		aux_write_ack(100);			/* 100 samples/sec */
		aux_write_ack(AUX_SET_RES);
		aux_write_ack(3);			/* 8 counts per mm */
		aux_write_ack(AUX_SET_SCALE21);		/* 2:1 scaling */
		poll_aux_status_nosleep();
#endif /* INITIALIZE_DEVICE */
		outb_p(AUX_DISABLE,AUX_COMMAND);   /* Disable Aux device */
		poll_aux_status_nosleep();
		outb_p(AUX_CMD_WRITE,AUX_COMMAND);
		poll_aux_status_nosleep();             /* Disable interrupts */
		outb_p(AUX_INTS_OFF, AUX_OUTPUT_PORT); /*  on the controller */
	}
	return 0;
}
Пример #3
0
int   qpmouse_init(void)
{
  if (!probe_qp())
    return - 5 ;
  
  printk   ("<6>"  "82C710 type pointing device detected -- driver installed.\n");
  
  qp_present = 1;
  misc_register   (&qp_mouse);
  queue = (struct qp_queue *)  kmalloc   (sizeof(*queue), (0x04  | 0x01  | 0x10 ) );

  if(queue) memset(queue, 0, sizeof(*queue));

  /* BLAST
    (__builtin_constant_p(  0 ) ? (__builtin_constant_p( (  sizeof(*queue) ) ) ? __constant_c_and_count_memset(( ( queue ) ),( (0x01010101UL*(unsigned char)(  0 )) ),( (  sizeof(*queue) ) )) : __constant_c_memset(( ( queue ) ),( (0x01010101UL*(unsigned char)(  0 )) ),( (  sizeof(*queue) ) )))  : (__builtin_constant_p( (  sizeof(*queue) ) ) ? __memset_generic(( ( ( queue ) ) ),( ( (  0 ) ) ),( ( (  sizeof(*queue) ) ) ))  : __memset_generic(( ( queue ) ),( (  0 ) ),( (  sizeof(*queue) ) ))) ) ;
  */

  queue->head = queue->tail = 0;
  queue->proc_list = ((void *)0) ;

  return 0;
}