Lines Matching refs:hdev

94 	struct hid_device *hdev;
139 ret = hid_hw_output_report(mcp->hdev, buf, len);
359 hid_hw_power(mcp->hdev, PM_HINT_FULLON);
402 hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
461 hid_hw_power(mcp->hdev, PM_HINT_FULLON);
590 hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
754 static int mcp2221_raw_event(struct hid_device *hdev,
758 struct mcp2221 *mcp = hid_get_drvdata(hdev);
938 struct hid_device *hdev = ptr;
940 hid_hw_close(hdev);
941 hid_hw_stop(hdev);
945 static void mcp2221_remove(struct hid_device *hdev)
948 struct mcp2221 *mcp = hid_get_drvdata(hdev);
1071 hid_hw_power(mcp->hdev, PM_HINT_FULLON);
1091 indio_dev = devm_iio_device_alloc(&mcp->hdev->dev, sizeof(*data));
1104 devm_iio_device_register(&mcp->hdev->dev, indio_dev);
1108 hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
1114 hid_hw_power(mcp->hdev, PM_HINT_NORMAL);
1124 static int mcp2221_probe(struct hid_device *hdev,
1130 mcp = devm_kzalloc(&hdev->dev, sizeof(*mcp), GFP_KERNEL);
1134 ret = hid_parse(hdev);
1136 hid_err(hdev, "can't parse reports\n");
1144 ret = hid_hw_start(hdev, 0);
1146 hid_err(hdev, "can't start hardware\n");
1150 hid_info(hdev, "USB HID v%x.%02x Device [%s] on %s\n", hdev->version >> 8,
1151 hdev->version & 0xff, hdev->name, hdev->phys);
1153 ret = hid_hw_open(hdev);
1155 hid_err(hdev, "can't open device\n");
1156 hid_hw_stop(hdev);
1162 hid_set_drvdata(hdev, mcp);
1163 mcp->hdev = hdev;
1165 ret = devm_add_action_or_reset(&hdev->dev, mcp2221_hid_unregister, hdev);
1169 hid_device_io_start(hdev);
1179 hid_err(hdev, "can't set i2c speed: %d\n", ret);
1187 mcp->adapter.dev.parent = &hdev->dev;
1188 ACPI_COMPANION_SET(&mcp->adapter.dev, ACPI_COMPANION(hdev->dev.parent));
1193 ret = devm_i2c_add_adapter(&hdev->dev, &mcp->adapter);
1195 hid_err(hdev, "can't add usb-i2c adapter: %d\n", ret);
1201 mcp->gc = devm_kzalloc(&hdev->dev, sizeof(*mcp->gc), GFP_KERNEL);
1214 mcp->gc->parent = &hdev->dev;
1216 ret = devm_gpiochip_add_data(&hdev->dev, mcp->gc, mcp);