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);
519 hid_dbg(wdata->hdev, "motion plus ID: %6phC\n", rmem);
524 hid_info(wdata->hdev, "unknown motion plus ID: %6phC\n", rmem);
540 hid_dbg(wdata->hdev, "mapped motion plus ID: %6phC\n", rmem);
643 wdata->input->dev.parent = &wdata->hdev->dev;
644 wdata->input->id.bustype = wdata->hdev->bus;
645 wdata->input->id.vendor = wdata->hdev->vendor;
646 wdata->input->id.product = wdata->hdev->product;
647 wdata->input->id.version = wdata->hdev->version;
816 vendor = wdata->hdev->vendor;
817 product = wdata->hdev->product;
818 name = wdata->hdev->name;
854 hid_info(wdata->hdev, "cannot detect device; NAME: %s VID: %04x PID: %04x EXT: %04x\n",
857 hid_info(wdata->hdev, "detected device: %s\n",
922 hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n");
973 hid_dbg(wdata->hdev, "state left: !EXT && MP\n");
997 hid_dbg(wdata->hdev, "state left: EXT && !MP\n");
1024 hid_dbg(wdata->hdev, "state left: !EXT && !MP\n");
1054 hid_dbg(wdata->hdev, "state left: EXT && MP\n");
1101 hid_dbg(wdata->hdev, "detect extensions..\n");
1134 hid_info(wdata->hdev, "cannot detect extension; %6phC\n",
1141 hid_info(wdata->hdev, "detected extension: %s\n",
1151 hid_info(wdata->hdev, "detected extension: Nintendo Wii Motion Plus\n");
1199 hid_dbg(wdata->hdev, "detected extensions: MP: %d EXT: %d\n",
1218 kobject_uevent(&wdata->hdev->dev.kobj, KOBJ_CHANGE);
1325 hid_dbg(wdata->hdev, "MP hotplug: 1\n");
1331 hid_dbg(wdata->hdev, "MP hotplug: 0\n");
1427 hid_dbg(wdata->hdev, "EXT hotplug: 1\n");
1433 hid_dbg(wdata->hdev, "EXT hotplug: 0\n");
1485 hid_warn(wdata->hdev, "Remote error %hhu on req %hhu\n", err,
1617 static int wiimote_hid_event(struct hid_device *hdev, struct hid_report *report,
1620 struct wiimote_data *wdata = hid_get_drvdata(hdev);
1639 hid_warn(hdev, "Unhandled report %hhu size %d\n", raw_data[0],
1729 static struct wiimote_data *wiimote_create(struct hid_device *hdev)
1737 wdata->hdev = hdev;
1738 hid_set_drvdata(hdev, wdata);
1769 device_remove_file(&wdata->hdev->dev, &dev_attr_devtype);
1770 device_remove_file(&wdata->hdev->dev, &dev_attr_extension);
1776 hid_hw_close(wdata->hdev);
1777 hid_hw_stop(wdata->hdev);
1782 static int wiimote_hid_probe(struct hid_device *hdev,
1788 hdev->quirks |= HID_QUIRK_NO_INIT_REPORTS;
1790 wdata = wiimote_create(hdev);
1792 hid_err(hdev, "Can't alloc device\n");
1796 ret = hid_parse(hdev);
1798 hid_err(hdev, "HID parse failed\n");
1802 ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
1804 hid_err(hdev, "HW start failed\n");
1808 ret = hid_hw_open(hdev);
1810 hid_err(hdev, "cannot start hardware I/O\n");
1814 ret = device_create_file(&hdev->dev, &dev_attr_extension);
1816 hid_err(hdev, "cannot create sysfs attribute\n");
1820 ret = device_create_file(&hdev->dev, &dev_attr_devtype);
1822 hid_err(hdev, "cannot create sysfs attribute\n");
1830 hid_info(hdev, "New device registered\n");
1842 device_remove_file(&wdata->hdev->dev, &dev_attr_extension);
1844 hid_hw_close(hdev);
1846 hid_hw_stop(hdev);
1854 static void wiimote_hid_remove(struct hid_device *hdev)
1856 struct wiimote_data *wdata = hid_get_drvdata(hdev);
1858 hid_info(hdev, "Device removed\n");