Lines Matching defs:hdev

125 	struct hid_device *hdev, *client_hdev;
150 r = steam->hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0];
152 hid_err(steam->hdev, "No HID_FEATURE_REPORT submitted - nothing to read\n");
169 ret = hid_hw_raw_request(steam->hdev, 0x00,
186 r = steam->hdev->report_enum[HID_FEATURE_REPORT].report_id_hash[0];
188 hid_err(steam->hdev, "No HID_FEATURE_REPORT submitted - nothing to read\n");
209 ret = hid_hw_raw_request(steam->hdev, 0,
219 hid_err(steam->hdev, "%s: error %d (%*ph)\n", __func__,
450 steam->battery_desc.name = devm_kasprintf(&steam->hdev->dev,
462 battery = power_supply_register(&steam->hdev->dev,
466 hid_err(steam->hdev,
472 power_supply_powers(battery, &steam->hdev->dev);
478 struct hid_device *hdev = steam->hdev;
495 input->dev.parent = &hdev->dev;
502 input->phys = hdev->phys;
504 input->id.bustype = hdev->bus;
505 input->id.vendor = hdev->vendor;
506 input->id.product = hdev->product;
507 input->id.version = hdev->version;
657 hid_info(steam->hdev, "Steam Controller '%s' connected",
689 hid_info(steam->hdev, "Steam Controller '%s' disconnected",
713 hid_err(steam->hdev,
722 static bool steam_is_valve_interface(struct hid_device *hdev)
737 rep_enum = &hdev->report_enum[HID_FEATURE_REPORT];
757 static int steam_client_ll_parse(struct hid_device *hdev)
759 struct steam_device *steam = hdev->driver_data;
761 return hid_parse_report(hdev, steam->hdev->dev_rdesc,
762 steam->hdev->dev_rsize);
765 static int steam_client_ll_start(struct hid_device *hdev)
770 static void steam_client_ll_stop(struct hid_device *hdev)
774 static int steam_client_ll_open(struct hid_device *hdev)
776 struct steam_device *steam = hdev->driver_data;
787 static void steam_client_ll_close(struct hid_device *hdev)
789 struct steam_device *steam = hdev->driver_data;
808 static int steam_client_ll_raw_request(struct hid_device *hdev,
813 struct steam_device *steam = hdev->driver_data;
815 return hid_hw_raw_request(steam->hdev, reportnum, buf, count,
828 static struct hid_device *steam_create_client_hid(struct hid_device *hdev)
837 client_hdev->dev.parent = hdev->dev.parent;
838 client_hdev->bus = hdev->bus;
839 client_hdev->vendor = hdev->vendor;
840 client_hdev->product = hdev->product;
841 client_hdev->version = hdev->version;
842 client_hdev->type = hdev->type;
843 client_hdev->country = hdev->country;
844 strscpy(client_hdev->name, hdev->name,
846 strscpy(client_hdev->phys, hdev->phys,
857 static int steam_probe(struct hid_device *hdev,
863 ret = hid_parse(hdev);
865 hid_err(hdev,
874 if (hdev->group == HID_GROUP_STEAM)
875 return hid_hw_start(hdev, HID_CONNECT_HIDRAW);
880 if (!steam_is_valve_interface(hdev))
881 return hid_hw_start(hdev, HID_CONNECT_DEFAULT);
883 steam = devm_kzalloc(&hdev->dev, sizeof(*steam), GFP_KERNEL);
888 steam->hdev = hdev;
889 hid_set_drvdata(hdev, steam);
898 steam->client_hdev = steam_create_client_hid(hdev);
909 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_HIDRAW);
917 ret = hid_hw_open(hdev);
919 hid_err(hdev,
926 hid_info(hdev, "Steam wireless receiver connected");
935 hid_err(hdev,
947 hid_hw_stop(hdev);
955 hid_err(hdev, "%s: failed with error %d\n",
960 static void steam_remove(struct hid_device *hdev)
962 struct steam_device *steam = hid_get_drvdata(hdev);
964 if (!steam || hdev->group == HID_GROUP_STEAM) {
965 hid_hw_stop(hdev);
977 hid_info(hdev, "Steam wireless receiver disconnected");
979 hid_hw_close(hdev);
980 hid_hw_stop(hdev);
1343 static int steam_raw_event(struct hid_device *hdev,
1347 struct steam_device *steam = hid_get_drvdata(hdev);