Lines Matching refs:hv_dev

98 	struct hv_device *hv_dev;  member
108 static void hv_kbd_on_receive(struct hv_device *hv_dev, in hv_kbd_on_receive() argument
111 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_on_receive()
127 dev_err(&hv_dev->device, in hv_kbd_on_receive()
146 dev_err(&hv_dev->device, in hv_kbd_on_receive()
180 pm_wakeup_event(&hv_dev->device, 0); in hv_kbd_on_receive()
185 dev_err(&hv_dev->device, in hv_kbd_on_receive()
190 static void hv_kbd_handle_received_packet(struct hv_device *hv_dev, in hv_kbd_handle_received_packet() argument
228 dev_err(&hv_dev->device, in hv_kbd_handle_received_packet()
235 hv_kbd_on_receive(hv_dev, msg, msg_sz); in hv_kbd_handle_received_packet()
239 dev_err(&hv_dev->device, in hv_kbd_handle_received_packet()
248 struct hv_device *hv_dev = context; in hv_kbd_on_channel_callback() local
260 error = vmbus_recvpacket_raw(hv_dev->channel, buffer, bufferlen, in hv_kbd_on_channel_callback()
269 hv_kbd_handle_received_packet(hv_dev, buffer, in hv_kbd_on_channel_callback()
285 static int hv_kbd_connect_to_vsp(struct hv_device *hv_dev) in hv_kbd_connect_to_vsp() argument
287 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_connect_to_vsp()
298 error = vmbus_sendpacket(hv_dev->channel, request, in hv_kbd_connect_to_vsp()
312 dev_err(&hv_dev->device, in hv_kbd_connect_to_vsp()
343 static int hv_kbd_probe(struct hv_device *hv_dev, in hv_kbd_probe() argument
357 kbd_dev->hv_dev = hv_dev; in hv_kbd_probe()
361 hv_set_drvdata(hv_dev, kbd_dev); in hv_kbd_probe()
363 hv_serio->dev.parent = &hv_dev->device; in hv_kbd_probe()
366 strlcpy(hv_serio->name, dev_name(&hv_dev->device), in hv_kbd_probe()
368 strlcpy(hv_serio->phys, dev_name(&hv_dev->device), in hv_kbd_probe()
374 error = vmbus_open(hv_dev->channel, in hv_kbd_probe()
379 hv_dev); in hv_kbd_probe()
383 error = hv_kbd_connect_to_vsp(hv_dev); in hv_kbd_probe()
389 device_init_wakeup(&hv_dev->device, true); in hv_kbd_probe()
394 vmbus_close(hv_dev->channel); in hv_kbd_probe()
401 static int hv_kbd_remove(struct hv_device *hv_dev) in hv_kbd_remove() argument
403 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_remove()
405 device_init_wakeup(&hv_dev->device, false); in hv_kbd_remove()
407 vmbus_close(hv_dev->channel); in hv_kbd_remove()
410 hv_set_drvdata(hv_dev, NULL); in hv_kbd_remove()