Lines Matching refs:kbd_dev

103 	struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev);  in hv_kbd_on_receive()  local
125 memcpy(&kbd_dev->protocol_resp, msg, in hv_kbd_on_receive()
127 complete(&kbd_dev->wait_event); in hv_kbd_on_receive()
150 spin_lock_irqsave(&kbd_dev->lock, flags); in hv_kbd_on_receive()
151 if (kbd_dev->started) { in hv_kbd_on_receive()
153 serio_interrupt(kbd_dev->hv_serio, in hv_kbd_on_receive()
156 serio_interrupt(kbd_dev->hv_serio, in hv_kbd_on_receive()
162 serio_interrupt(kbd_dev->hv_serio, scan_code, 0); in hv_kbd_on_receive()
164 spin_unlock_irqrestore(&kbd_dev->lock, flags); in hv_kbd_on_receive()
256 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_connect_to_vsp() local
262 reinit_completion(&kbd_dev->wait_event); in hv_kbd_connect_to_vsp()
264 request = &kbd_dev->protocol_req; in hv_kbd_connect_to_vsp()
277 if (!wait_for_completion_timeout(&kbd_dev->wait_event, 10 * HZ)) in hv_kbd_connect_to_vsp()
280 response = &kbd_dev->protocol_resp; in hv_kbd_connect_to_vsp()
294 struct hv_kbd_dev *kbd_dev = serio->port_data; in hv_kbd_start() local
297 spin_lock_irqsave(&kbd_dev->lock, flags); in hv_kbd_start()
298 kbd_dev->started = true; in hv_kbd_start()
299 spin_unlock_irqrestore(&kbd_dev->lock, flags); in hv_kbd_start()
306 struct hv_kbd_dev *kbd_dev = serio->port_data; in hv_kbd_stop() local
309 spin_lock_irqsave(&kbd_dev->lock, flags); in hv_kbd_stop()
310 kbd_dev->started = false; in hv_kbd_stop()
311 spin_unlock_irqrestore(&kbd_dev->lock, flags); in hv_kbd_stop()
317 struct hv_kbd_dev *kbd_dev; in hv_kbd_probe() local
321 kbd_dev = kzalloc(sizeof(struct hv_kbd_dev), GFP_KERNEL); in hv_kbd_probe()
323 if (!kbd_dev || !hv_serio) { in hv_kbd_probe()
328 kbd_dev->hv_dev = hv_dev; in hv_kbd_probe()
329 kbd_dev->hv_serio = hv_serio; in hv_kbd_probe()
330 spin_lock_init(&kbd_dev->lock); in hv_kbd_probe()
331 init_completion(&kbd_dev->wait_event); in hv_kbd_probe()
332 hv_set_drvdata(hv_dev, kbd_dev); in hv_kbd_probe()
336 hv_serio->port_data = kbd_dev; in hv_kbd_probe()
358 serio_register_port(kbd_dev->hv_serio); in hv_kbd_probe()
368 kfree(kbd_dev); in hv_kbd_probe()
374 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_remove() local
376 serio_unregister_port(kbd_dev->hv_serio); in hv_kbd_remove()
378 kfree(kbd_dev); in hv_kbd_remove()