Lines Matching refs:hv_dev

90 	struct hv_device *hv_dev;  member
100 static void hv_kbd_on_receive(struct hv_device *hv_dev, in hv_kbd_on_receive() argument
103 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_on_receive()
119 dev_err(&hv_dev->device, in hv_kbd_on_receive()
138 dev_err(&hv_dev->device, in hv_kbd_on_receive()
172 pm_wakeup_hard_event(&hv_dev->device); in hv_kbd_on_receive()
177 dev_err(&hv_dev->device, in hv_kbd_on_receive()
182 static void hv_kbd_handle_received_packet(struct hv_device *hv_dev, in hv_kbd_handle_received_packet() argument
220 dev_err(&hv_dev->device, in hv_kbd_handle_received_packet()
227 hv_kbd_on_receive(hv_dev, msg, msg_sz); in hv_kbd_handle_received_packet()
231 dev_err(&hv_dev->device, in hv_kbd_handle_received_packet()
241 struct hv_device *hv_dev = context; in hv_kbd_on_channel_callback() local
245 foreach_vmbus_pkt(desc, hv_dev->channel) { in hv_kbd_on_channel_callback()
249 hv_kbd_handle_received_packet(hv_dev, desc, bytes_recvd, in hv_kbd_on_channel_callback()
254 static int hv_kbd_connect_to_vsp(struct hv_device *hv_dev) in hv_kbd_connect_to_vsp() argument
256 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_connect_to_vsp()
269 error = vmbus_sendpacket(hv_dev->channel, request, in hv_kbd_connect_to_vsp()
283 dev_err(&hv_dev->device, in hv_kbd_connect_to_vsp()
314 static int hv_kbd_probe(struct hv_device *hv_dev, in hv_kbd_probe() argument
328 kbd_dev->hv_dev = hv_dev; in hv_kbd_probe()
332 hv_set_drvdata(hv_dev, kbd_dev); in hv_kbd_probe()
334 hv_serio->dev.parent = &hv_dev->device; in hv_kbd_probe()
337 strscpy(hv_serio->name, dev_name(&hv_dev->device), in hv_kbd_probe()
339 strscpy(hv_serio->phys, dev_name(&hv_dev->device), in hv_kbd_probe()
345 error = vmbus_open(hv_dev->channel, in hv_kbd_probe()
350 hv_dev); in hv_kbd_probe()
354 error = hv_kbd_connect_to_vsp(hv_dev); in hv_kbd_probe()
360 device_init_wakeup(&hv_dev->device, true); in hv_kbd_probe()
365 vmbus_close(hv_dev->channel); in hv_kbd_probe()
372 static void hv_kbd_remove(struct hv_device *hv_dev) in hv_kbd_remove() argument
374 struct hv_kbd_dev *kbd_dev = hv_get_drvdata(hv_dev); in hv_kbd_remove()
377 vmbus_close(hv_dev->channel); in hv_kbd_remove()
380 hv_set_drvdata(hv_dev, NULL); in hv_kbd_remove()
383 static int hv_kbd_suspend(struct hv_device *hv_dev) in hv_kbd_suspend() argument
385 vmbus_close(hv_dev->channel); in hv_kbd_suspend()
390 static int hv_kbd_resume(struct hv_device *hv_dev) in hv_kbd_resume() argument
394 ret = vmbus_open(hv_dev->channel, in hv_kbd_resume()
399 hv_dev); in hv_kbd_resume()
401 ret = hv_kbd_connect_to_vsp(hv_dev); in hv_kbd_resume()