Lines Matching refs:hdev
25 static int wiimote_hid_send(struct hid_device *hdev, __u8 *buffer, in wiimote_hid_send() argument
31 if (!hdev->ll_driver->output_report) in wiimote_hid_send()
38 ret = hid_hw_output_report(hdev, buf, count); in wiimote_hid_send()
57 ret = wiimote_hid_send(wdata->hdev, in wiimote_queue_worker()
80 hid_warn(wdata->hdev, "Sending too large output report\n"); in wiimote_queue()
108 hid_warn(wdata->hdev, "Output queue is full"); in wiimote_queue()
320 hid_warn(wdata->hdev, "Invalid length %d wmem request\n", size); in wiiproto_req_wmem()
345 hid_warn(wdata->hdev, "Invalid length %d rmem request\n", size); in wiiproto_req_rmem()
444 hid_dbg(wdata->hdev, "extension ID: %6phC\n", rmem); in wiimote_cmd_read_ext()
514 hid_dbg(wdata->hdev, "motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp()
519 hid_info(wdata->hdev, "unknown motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp()
535 hid_dbg(wdata->hdev, "mapped motion plus ID: %6phC\n", rmem); in wiimote_cmd_read_mp_mapped()
638 wdata->input->dev.parent = &wdata->hdev->dev; in wiimote_modules_load()
639 wdata->input->id.bustype = wdata->hdev->bus; in wiimote_modules_load()
640 wdata->input->id.vendor = wdata->hdev->vendor; in wiimote_modules_load()
641 wdata->input->id.product = wdata->hdev->product; in wiimote_modules_load()
642 wdata->input->id.version = wdata->hdev->version; in wiimote_modules_load()
811 vendor = wdata->hdev->vendor; in wiimote_init_set_type()
812 product = wdata->hdev->product; in wiimote_init_set_type()
813 name = wdata->hdev->name; in wiimote_init_set_type()
849 hid_info(wdata->hdev, "cannot detect device; NAME: %s VID: %04x PID: %04x EXT: %04x\n", in wiimote_init_set_type()
852 hid_info(wdata->hdev, "detected device: %s\n", in wiimote_init_set_type()
917 hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n"); in wiimote_init_poll_mp()
968 hid_dbg(wdata->hdev, "state left: !EXT && MP\n"); in wiimote_init_check()
992 hid_dbg(wdata->hdev, "state left: EXT && !MP\n"); in wiimote_init_check()
1019 hid_dbg(wdata->hdev, "state left: !EXT && !MP\n"); in wiimote_init_check()
1049 hid_dbg(wdata->hdev, "state left: EXT && MP\n"); in wiimote_init_check()
1094 hid_dbg(wdata->hdev, "detect extensions..\n"); in wiimote_init_hotplug()
1127 hid_info(wdata->hdev, "cannot detect extension; %6phC\n", in wiimote_init_hotplug()
1134 hid_info(wdata->hdev, "detected extension: %s\n", in wiimote_init_hotplug()
1144 hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n"); in wiimote_init_hotplug()
1192 hid_dbg(wdata->hdev, "detected extensions: MP: %d EXT: %d\n", in wiimote_init_hotplug()
1211 kobject_uevent(&wdata->hdev->dev.kobj, KOBJ_CHANGE); in wiimote_init_worker()
1318 hid_dbg(wdata->hdev, "MP hotplug: 1\n"); in handler_ext()
1324 hid_dbg(wdata->hdev, "MP hotplug: 0\n"); in handler_ext()
1420 hid_dbg(wdata->hdev, "EXT hotplug: 1\n"); in handler_status()
1426 hid_dbg(wdata->hdev, "EXT hotplug: 0\n"); in handler_status()
1478 hid_warn(wdata->hdev, "Remote error %hhu on req %hhu\n", err, in handler_return()
1610 static int wiimote_hid_event(struct hid_device *hdev, struct hid_report *report, in wiimote_hid_event() argument
1613 struct wiimote_data *wdata = hid_get_drvdata(hdev); in wiimote_hid_event()
1632 hid_warn(hdev, "Unhandled report %hhu size %d\n", raw_data[0], in wiimote_hid_event()
1722 static struct wiimote_data *wiimote_create(struct hid_device *hdev) in wiimote_create() argument
1730 wdata->hdev = hdev; in wiimote_create()
1731 hid_set_drvdata(hdev, wdata); in wiimote_create()
1762 device_remove_file(&wdata->hdev->dev, &dev_attr_devtype); in wiimote_destroy()
1763 device_remove_file(&wdata->hdev->dev, &dev_attr_extension); in wiimote_destroy()
1769 hid_hw_close(wdata->hdev); in wiimote_destroy()
1770 hid_hw_stop(wdata->hdev); in wiimote_destroy()
1775 static int wiimote_hid_probe(struct hid_device *hdev, in wiimote_hid_probe() argument
1781 hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS; in wiimote_hid_probe()
1783 wdata = wiimote_create(hdev); in wiimote_hid_probe()
1785 hid_err(hdev, "Can't alloc device\n"); in wiimote_hid_probe()
1789 ret = hid_parse(hdev); in wiimote_hid_probe()
1791 hid_err(hdev, "HID parse failed\n"); in wiimote_hid_probe()
1795 ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW); in wiimote_hid_probe()
1797 hid_err(hdev, "HW start failed\n"); in wiimote_hid_probe()
1801 ret = hid_hw_open(hdev); in wiimote_hid_probe()
1803 hid_err(hdev, "cannot start hardware I/O\n"); in wiimote_hid_probe()
1807 ret = device_create_file(&hdev->dev, &dev_attr_extension); in wiimote_hid_probe()
1809 hid_err(hdev, "cannot create sysfs attribute\n"); in wiimote_hid_probe()
1813 ret = device_create_file(&hdev->dev, &dev_attr_devtype); in wiimote_hid_probe()
1815 hid_err(hdev, "cannot create sysfs attribute\n"); in wiimote_hid_probe()
1823 hid_info(hdev, "New device registered\n"); in wiimote_hid_probe()
1835 device_remove_file(&wdata->hdev->dev, &dev_attr_extension); in wiimote_hid_probe()
1837 hid_hw_close(hdev); in wiimote_hid_probe()
1839 hid_hw_stop(hdev); in wiimote_hid_probe()
1847 static void wiimote_hid_remove(struct hid_device *hdev) in wiimote_hid_remove() argument
1849 struct wiimote_data *wdata = hid_get_drvdata(hdev); in wiimote_hid_remove()
1851 hid_info(hdev, "Device removed\n"); in wiimote_hid_remove()