Lines Matching defs:hdev
50 static int plantronics_input_mapping(struct hid_device *hdev,
57 struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
109 hid_dbg(hdev, "usage: %08x (appl: %08x) - defaulted\n",
115 hid_dbg(hdev, "usage: %08x (appl: %08x) - mapped to key %d\n",
120 static int plantronics_event(struct hid_device *hdev, struct hid_field *field,
123 struct plt_drv_data *drv_data = hid_get_drvdata(hdev);
144 static unsigned long plantronics_device_type(struct hid_device *hdev)
147 unsigned long plt_type = hdev->product;
154 for (i = 0; i < hdev->maxcollection; i++) {
155 col_page = hdev->collection[i].usage & HID_USAGE_PAGE;
157 plt_type = hdev->collection[i].usage;
161 plt_type = hdev->collection[i].usage;
165 hid_dbg(hdev, "plt_type decoded as: %08lx\n", plt_type);
169 static int plantronics_probe(struct hid_device *hdev,
175 drv_data = devm_kzalloc(&hdev->dev, sizeof(*drv_data), GFP_KERNEL);
179 ret = hid_parse(hdev);
181 hid_err(hdev, "parse failed\n");
185 drv_data->device_type = plantronics_device_type(hdev);
189 hid_set_drvdata(hdev, drv_data);
191 ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT |
194 hid_err(hdev, "hw start failed\n");