Lines Matching defs:hdev

73 	struct hid_device *hdev;
101 static int udraw_raw_event(struct hid_device *hdev, struct hid_report *report,
104 struct udraw *udraw = hid_get_drvdata(hdev);
268 return hid_hw_open(udraw->hdev);
275 hid_hw_close(udraw->hdev);
278 static struct input_dev *allocate_and_setup(struct hid_device *hdev,
283 input_dev = devm_input_allocate_device(&hdev->dev);
288 input_dev->phys = hdev->phys;
289 input_dev->dev.parent = &hdev->dev;
292 input_dev->uniq = hdev->uniq;
293 input_dev->id.bustype = hdev->bus;
294 input_dev->id.vendor = hdev->vendor;
295 input_dev->id.product = hdev->product;
296 input_dev->id.version = hdev->version;
297 input_set_drvdata(input_dev, hid_get_drvdata(hdev));
303 struct hid_device *hdev)
307 input_dev = allocate_and_setup(hdev, DEVICE_NAME " Touchpad");
330 struct hid_device *hdev)
334 input_dev = allocate_and_setup(hdev, DEVICE_NAME " Pen");
358 struct hid_device *hdev)
362 input_dev = allocate_and_setup(hdev, DEVICE_NAME " Accelerometer");
381 struct hid_device *hdev)
385 input_dev = allocate_and_setup(hdev, DEVICE_NAME " Joypad");
407 static int udraw_probe(struct hid_device *hdev, const struct hid_device_id *id)
412 udraw = devm_kzalloc(&hdev->dev, sizeof(struct udraw), GFP_KERNEL);
416 udraw->hdev = hdev;
420 hid_set_drvdata(hdev, udraw);
422 ret = hid_parse(hdev);
424 hid_err(hdev, "parse failed\n");
428 if (!udraw_setup_joypad(udraw, hdev) ||
429 !udraw_setup_touch(udraw, hdev) ||
430 !udraw_setup_pen(udraw, hdev) ||
431 !udraw_setup_accel(udraw, hdev)) {
432 hid_err(hdev, "could not allocate interfaces\n");
441 hid_err(hdev, "failed to register interfaces\n");
445 ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW | HID_CONNECT_DRIVER);
447 hid_err(hdev, "hw start failed\n");