Lines Matching refs:q40kbd
37 struct q40kbd { struct
44 struct q40kbd *q40kbd = dev_id; in q40kbd_interrupt() argument
47 spin_lock_irqsave(&q40kbd->lock, flags); in q40kbd_interrupt()
50 serio_interrupt(q40kbd->port, master_inb(KEYCODE_REG), 0); in q40kbd_interrupt()
54 spin_unlock_irqrestore(&q40kbd->lock, flags); in q40kbd_interrupt()
63 static void q40kbd_flush(struct q40kbd *q40kbd) in q40kbd_flush() argument
68 spin_lock_irqsave(&q40kbd->lock, flags); in q40kbd_flush()
73 spin_unlock_irqrestore(&q40kbd->lock, flags); in q40kbd_flush()
89 struct q40kbd *q40kbd = port->port_data; in q40kbd_open() local
91 q40kbd_flush(q40kbd); in q40kbd_open()
102 struct q40kbd *q40kbd = port->port_data; in q40kbd_close() local
105 q40kbd_flush(q40kbd); in q40kbd_close()
110 struct q40kbd *q40kbd; in q40kbd_probe() local
114 q40kbd = kzalloc(sizeof(struct q40kbd), GFP_KERNEL); in q40kbd_probe()
116 if (!q40kbd || !port) { in q40kbd_probe()
121 q40kbd->port = port; in q40kbd_probe()
122 spin_lock_init(&q40kbd->lock); in q40kbd_probe()
127 port->port_data = q40kbd; in q40kbd_probe()
135 DRV_NAME, q40kbd); in q40kbd_probe()
141 serio_register_port(q40kbd->port); in q40kbd_probe()
143 platform_set_drvdata(pdev, q40kbd); in q40kbd_probe()
150 kfree(q40kbd); in q40kbd_probe()
156 struct q40kbd *q40kbd = platform_get_drvdata(pdev); in q40kbd_remove() local
163 serio_unregister_port(q40kbd->port); in q40kbd_remove()
164 free_irq(Q40_IRQ_KEYBOARD, q40kbd); in q40kbd_remove()
165 kfree(q40kbd); in q40kbd_remove()