Lines Matching refs:hdev
64 struct hid_device *hdev; member
78 hid_dbg(tdev->hdev, "-> %d %c %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n", in thingm_send()
82 ret = hid_hw_raw_request(tdev->hdev, buf[0], buf, REPORT_SIZE, in thingm_send()
92 ret = hid_hw_raw_request(tdev->hdev, buf[0], buf, REPORT_SIZE, in thingm_recv()
97 hid_dbg(tdev->hdev, "<- %d %c %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx\n", in thingm_recv()
141 hid_err(rgb->tdev->hdev, "failed to write color\n"); in thingm_work()
157 const int minor = ((struct hidraw *) rgb->tdev->hdev->hidraw)->minor; in thingm_init_rgb()
168 err = led_classdev_register(&rgb->tdev->hdev->dev, &rgb->red.ldev); in thingm_init_rgb()
180 err = led_classdev_register(&rgb->tdev->hdev->dev, &rgb->green.ldev); in thingm_init_rgb()
192 err = led_classdev_register(&rgb->tdev->hdev->dev, &rgb->blue.ldev); in thingm_init_rgb()
217 static int thingm_probe(struct hid_device *hdev, const struct hid_device_id *id) in thingm_probe() argument
222 tdev = devm_kzalloc(&hdev->dev, sizeof(struct thingm_device), in thingm_probe()
227 tdev->hdev = hdev; in thingm_probe()
228 hid_set_drvdata(hdev, tdev); in thingm_probe()
230 err = hid_parse(hdev); in thingm_probe()
234 err = hid_hw_start(hdev, HID_CONNECT_HIDRAW); in thingm_probe()
244 hid_dbg(hdev, "firmware version: %c.%c\n", in thingm_probe()
252 hid_err(hdev, "unsupported firmware %c\n", tdev->version.major); in thingm_probe()
257 tdev->rgb = devm_kzalloc(&hdev->dev, in thingm_probe()
280 hid_hw_stop(hdev); in thingm_probe()
285 static void thingm_remove(struct hid_device *hdev) in thingm_remove() argument
287 struct thingm_device *tdev = hid_get_drvdata(hdev); in thingm_remove()
290 hid_hw_stop(hdev); in thingm_remove()