Lines Matching refs:hdev

22 static int wiimote_hid_send(struct hid_device *hdev, __u8 *buffer,  in wiimote_hid_send()  argument
28 if (!hdev->ll_driver->output_report) in wiimote_hid_send()
35 ret = hid_hw_output_report(hdev, buf, count); in wiimote_hid_send()
54 ret = wiimote_hid_send(wdata->hdev, in wiimote_queue_worker()
77 hid_warn(wdata->hdev, "Sending too large output report\n"); in wiimote_queue()
105 hid_warn(wdata->hdev, "Output queue is full"); in wiimote_queue()
317 hid_warn(wdata->hdev, "Invalid length %d wmem request\n", size); in wiiproto_req_wmem()
342 hid_warn(wdata->hdev, "Invalid length %d rmem request\n", size); in wiiproto_req_rmem()
441 hid_dbg(wdata->hdev, "extension ID: %6phC\n", rmem); in wiimote_cmd_read_ext()
523 hid_dbg(wdata->hdev, "motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp()
528 hid_info(wdata->hdev, "unknown motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp()
544 hid_dbg(wdata->hdev, "mapped motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp_mapped()
647 wdata->input->dev.parent = &wdata->hdev->dev; in wiimote_modules_load()
648 wdata->input->id.bustype = wdata->hdev->bus; in wiimote_modules_load()
649 wdata->input->id.vendor = wdata->hdev->vendor; in wiimote_modules_load()
650 wdata->input->id.product = wdata->hdev->product; in wiimote_modules_load()
651 wdata->input->id.version = wdata->hdev->version; in wiimote_modules_load()
820 vendor = wdata->hdev->vendor; in wiimote_init_set_type()
821 product = wdata->hdev->product; in wiimote_init_set_type()
822 name = wdata->hdev->name; in wiimote_init_set_type()
858 hid_info(wdata->hdev, "cannot detect device; NAME: %s VID: %04x PID: %04x EXT: %04x\n", in wiimote_init_set_type()
861 hid_info(wdata->hdev, "detected device: %s\n", in wiimote_init_set_type()
926 hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n"); in wiimote_init_poll_mp()
977 hid_dbg(wdata->hdev, "state left: !EXT && MP\n"); in wiimote_init_check()
1001 hid_dbg(wdata->hdev, "state left: EXT && !MP\n"); in wiimote_init_check()
1028 hid_dbg(wdata->hdev, "state left: !EXT && !MP\n"); in wiimote_init_check()
1058 hid_dbg(wdata->hdev, "state left: EXT && MP\n"); in wiimote_init_check()
1106 hid_dbg(wdata->hdev, "detect extensions..\n"); in wiimote_init_hotplug()
1139 hid_info(wdata->hdev, "cannot detect extension; %6phC\n", in wiimote_init_hotplug()
1146 hid_info(wdata->hdev, "detected extension: %s\n", in wiimote_init_hotplug()
1156 hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n"); in wiimote_init_hotplug()
1204 hid_dbg(wdata->hdev, "detected extensions: MP: %d EXT: %d\n", in wiimote_init_hotplug()
1223 kobject_uevent(&wdata->hdev->dev.kobj, KOBJ_CHANGE); in wiimote_init_worker()
1330 hid_dbg(wdata->hdev, "MP hotplug: 1\n"); in handler_ext()
1336 hid_dbg(wdata->hdev, "MP hotplug: 0\n"); in handler_ext()
1432 hid_dbg(wdata->hdev, "EXT hotplug: 1\n"); in handler_status()
1438 hid_dbg(wdata->hdev, "EXT hotplug: 0\n"); in handler_status()
1490 hid_warn(wdata->hdev, "Remote error %u on req %u\n", err, in handler_return()
1622 static int wiimote_hid_event(struct hid_device *hdev, struct hid_report *report, in wiimote_hid_event() argument
1625 struct wiimote_data *wdata = hid_get_drvdata(hdev); in wiimote_hid_event()
1644 hid_warn(hdev, "Unhandled report %hhu size %d\n", raw_data[0], in wiimote_hid_event()
1736 static struct wiimote_data *wiimote_create(struct hid_device *hdev) in wiimote_create() argument
1744 wdata->hdev = hdev; in wiimote_create()
1745 hid_set_drvdata(hdev, wdata); in wiimote_create()
1776 device_remove_file(&wdata->hdev->dev, &dev_attr_devtype); in wiimote_destroy()
1777 device_remove_file(&wdata->hdev->dev, &dev_attr_extension); in wiimote_destroy()
1783 hid_hw_close(wdata->hdev); in wiimote_destroy()
1784 hid_hw_stop(wdata->hdev); in wiimote_destroy()
1789 static int wiimote_hid_probe(struct hid_device *hdev, in wiimote_hid_probe() argument
1795 hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS; in wiimote_hid_probe()
1797 wdata = wiimote_create(hdev); in wiimote_hid_probe()
1799 hid_err(hdev, "Can't alloc device\n"); in wiimote_hid_probe()
1803 ret = hid_parse(hdev); in wiimote_hid_probe()
1805 hid_err(hdev, "HID parse failed\n"); in wiimote_hid_probe()
1809 ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW); in wiimote_hid_probe()
1811 hid_err(hdev, "HW start failed\n"); in wiimote_hid_probe()
1815 ret = hid_hw_open(hdev); in wiimote_hid_probe()
1817 hid_err(hdev, "cannot start hardware I/O\n"); in wiimote_hid_probe()
1821 ret = device_create_file(&hdev->dev, &dev_attr_extension); in wiimote_hid_probe()
1823 hid_err(hdev, "cannot create sysfs attribute\n"); in wiimote_hid_probe()
1827 ret = device_create_file(&hdev->dev, &dev_attr_devtype); in wiimote_hid_probe()
1829 hid_err(hdev, "cannot create sysfs attribute\n"); in wiimote_hid_probe()
1837 hid_info(hdev, "New device registered\n"); in wiimote_hid_probe()
1849 device_remove_file(&wdata->hdev->dev, &dev_attr_extension); in wiimote_hid_probe()
1851 hid_hw_close(hdev); in wiimote_hid_probe()
1853 hid_hw_stop(hdev); in wiimote_hid_probe()
1861 static void wiimote_hid_remove(struct hid_device *hdev) in wiimote_hid_remove() argument
1863 struct wiimote_data *wdata = hid_get_drvdata(hdev); in wiimote_hid_remove()
1865 hid_info(hdev, "Device removed\n"); in wiimote_hid_remove()