Lines Matching refs:hv_dev

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