Lines Matching refs:intf
63 static int wacom_get_report(struct usb_interface *intf, u8 type, u8 id, in wacom_get_report() argument
66 struct usb_device *dev = interface_to_usbdev(intf); in wacom_get_report()
75 intf->altsetting[0].desc.bInterfaceNumber, in wacom_get_report()
82 static int wacom_set_report(struct usb_interface *intf, u8 type, u8 id, in wacom_set_report() argument
85 struct usb_device *dev = interface_to_usbdev(intf); in wacom_set_report()
93 intf->altsetting[0].desc.bInterfaceNumber, in wacom_set_report()
103 struct device *dev = &wacom->intf->dev; in wacom_sys_irq()
138 if (usb_autopm_get_interface(wacom->intf) < 0) in wacom_open()
149 wacom->intf->needs_remote_wakeup = 1; in wacom_open()
153 usb_autopm_put_interface(wacom->intf); in wacom_open()
162 autopm_error = usb_autopm_get_interface(wacom->intf); in wacom_close()
167 wacom->intf->needs_remote_wakeup = 0; in wacom_close()
171 usb_autopm_put_interface(wacom->intf); in wacom_close()
278 static void wacom_retrieve_report_data(struct usb_interface *intf, in wacom_retrieve_report_data() argument
288 result = wacom_get_report(intf, WAC_HID_FEATURE_REPORT, in wacom_retrieve_report_data()
335 static int wacom_parse_hid(struct usb_interface *intf, in wacom_parse_hid() argument
339 struct usb_device *dev = interface_to_usbdev(intf); in wacom_parse_hid()
356 intf->altsetting[0].desc.bInterfaceNumber, /* interface */ in wacom_parse_hid()
518 wacom_retrieve_report_data(intf, features); in wacom_parse_hid()
547 static int wacom_set_device_mode(struct usb_interface *intf, int report_id, int length, int mode) in wacom_set_device_mode() argument
560 error = wacom_set_report(intf, WAC_HID_FEATURE_REPORT, in wacom_set_device_mode()
563 error = wacom_get_report(intf, WAC_HID_FEATURE_REPORT, in wacom_set_device_mode()
579 static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_features *features) in wacom_query_tablet_data() argument
584 return wacom_set_device_mode(intf, 3, 4, 4); in wacom_query_tablet_data()
587 return wacom_set_device_mode(intf, 18, 3, 2); in wacom_query_tablet_data()
591 return wacom_set_device_mode(intf, 2, 2, 2); in wacom_query_tablet_data()
598 static int wacom_retrieve_hid_descriptor(struct usb_interface *intf, in wacom_retrieve_hid_descriptor() argument
602 struct usb_host_interface *interface = intf->cur_altsetting; in wacom_retrieve_hid_descriptor()
619 if (intf->cur_altsetting->desc.bInterfaceNumber == 0) { in wacom_retrieve_hid_descriptor()
621 } else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) { in wacom_retrieve_hid_descriptor()
637 dev_err(&intf->dev, in wacom_retrieve_hid_descriptor()
642 error = wacom_parse_hid(intf, hid_desc, features); in wacom_retrieve_hid_descriptor()
787 retval = wacom_set_report(wacom->intf, 0x03, WAC_CMD_LED_CONTROL, in wacom_led_control()
806 retval = wacom_set_report(wacom->intf, 0x03, WAC_CMD_ICON_START, in wacom_led_putimage()
817 retval = wacom_set_report(wacom->intf, 0x03, WAC_CMD_ICON_XFER, in wacom_led_putimage()
826 wacom_set_report(wacom->intf, 0x03, WAC_CMD_ICON_START, in wacom_led_putimage()
1003 error = sysfs_create_group(&wacom->intf->dev.kobj, in wacom_initialize_leds()
1015 error = sysfs_create_group(&wacom->intf->dev.kobj, in wacom_initialize_leds()
1028 error = sysfs_create_group(&wacom->intf->dev.kobj, in wacom_initialize_leds()
1037 dev_err(&wacom->intf->dev, in wacom_initialize_leds()
1052 sysfs_remove_group(&wacom->intf->dev.kobj, in wacom_destroy_leds()
1058 sysfs_remove_group(&wacom->intf->dev.kobj, in wacom_destroy_leds()
1065 sysfs_remove_group(&wacom->intf->dev.kobj, in wacom_destroy_leds()
1130 struct usb_interface *intf = wacom->intf; in wacom_register_input() local
1131 struct usb_device *dev = interface_to_usbdev(intf); in wacom_register_input()
1142 input_dev->dev.parent = &intf->dev; in wacom_register_input()
1197 dev_info(&wacom->intf->dev, "wireless tablet disconnected\n"); in wacom_wireless_work()
1201 dev_info(&wacom->intf->dev, in wacom_wireless_work()
1213 dev_info(&wacom->intf->dev, in wacom_wireless_work()
1254 static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) in wacom_probe() argument
1256 struct usb_device *dev = interface_to_usbdev(intf); in wacom_probe()
1292 wacom->intf = intf; in wacom_probe()
1298 endpoint = &intf->cur_altsetting->endpoint[0].desc; in wacom_probe()
1301 error = wacom_retrieve_hid_descriptor(intf, features); in wacom_probe()
1364 wacom_query_tablet_data(intf, features); in wacom_probe()
1366 usb_set_intfdata(intf, wacom); in wacom_probe()
1383 static void wacom_disconnect(struct usb_interface *intf) in wacom_disconnect() argument
1385 struct wacom *wacom = usb_get_intfdata(intf); in wacom_disconnect()
1387 usb_set_intfdata(intf, NULL); in wacom_disconnect()
1396 usb_free_coherent(interface_to_usbdev(intf), WACOM_PKGLEN_MAX, in wacom_disconnect()
1402 static int wacom_suspend(struct usb_interface *intf, pm_message_t message) in wacom_suspend() argument
1404 struct wacom *wacom = usb_get_intfdata(intf); in wacom_suspend()
1413 static int wacom_resume(struct usb_interface *intf) in wacom_resume() argument
1415 struct wacom *wacom = usb_get_intfdata(intf); in wacom_resume()
1422 wacom_query_tablet_data(intf, features); in wacom_resume()
1434 static int wacom_reset_resume(struct usb_interface *intf) in wacom_reset_resume() argument
1436 return wacom_resume(intf); in wacom_reset_resume()