Lines Matching defs:hdev
85 struct hid_device *hdev;
113 len = hid_hw_output_report(mcp->hdev, (u8 *) read_all,
148 status = hid_hw_output_report(mcp->hdev, (u8 *) cmd,
233 status = hid_hw_output_report(mcp->hdev, (u8 *) conf,
291 static int mcp2200_raw_event(struct hid_device *hdev, struct hid_report *report,
294 struct mcp2200 *mcp = hid_get_drvdata(hdev);
317 static int mcp2200_probe(struct hid_device *hdev, const struct hid_device_id *id)
322 mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
326 ret = hid_parse(hdev);
328 hid_err(hdev, "can't parse reports\n");
332 ret = hid_hw_start(hdev, 0);
334 hid_err(hdev, "can't start hardware\n");
338 hid_info(hdev, "USB HID v%x.%02x Device [%s] on %s\n", hdev->version >> 8,
339 hdev->version & 0xff, hdev->name, hdev->phys);
341 ret = hid_hw_open(hdev);
343 hid_err(hdev, "can't open device\n");
344 hid_hw_stop(hdev);
350 hid_set_drvdata(hdev, mcp);
351 mcp->hdev = hdev;
354 mcp->gc.parent = &hdev->dev;
356 ret = devm_gpiochip_add_data(&hdev->dev, &mcp->gc, mcp);
358 hid_err(hdev, "Unable to register gpiochip\n");
359 hid_hw_close(hdev);
360 hid_hw_stop(hdev);
367 static void mcp2200_remove(struct hid_device *hdev)
369 hid_hw_close(hdev);
370 hid_hw_stop(hdev);