Lines Matching defs:hdev

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