Lines Matching +full:simple +full:- +full:pm +full:- +full:bus

1 // SPDX-License-Identifier: GPL-2.0
3 * USB Serial Converter Bus specific functions
5 * Copyright (C) 2002 Greg Kroah-Hartman (greg@kroah.com)
24 * a simple check here. in usb_serial_device_match()
26 if (driver == port->serial->type) in usb_serial_device_match()
41 retval = usb_autopm_get_interface(port->serial->interface); in usb_serial_device_probe()
45 driver = port->serial->type; in usb_serial_device_probe()
46 if (driver->port_probe) { in usb_serial_device_probe()
47 retval = driver->port_probe(port); in usb_serial_device_probe()
52 minor = port->minor; in usb_serial_device_probe()
53 tty_dev = tty_port_register_device(&port->port, usb_serial_tty_driver, in usb_serial_device_probe()
60 usb_autopm_put_interface(port->serial->interface); in usb_serial_device_probe()
62 dev_info(&port->serial->dev->dev, in usb_serial_device_probe()
64 driver->description, minor); in usb_serial_device_probe()
69 if (driver->port_remove) in usb_serial_device_probe()
70 driver->port_remove(port); in usb_serial_device_probe()
72 usb_autopm_put_interface(port->serial->interface); in usb_serial_device_probe()
87 * Note that no further runtime PM callbacks will be made if in usb_serial_device_remove()
90 autopm_err = usb_autopm_get_interface(port->serial->interface); in usb_serial_device_remove()
92 minor = port->minor; in usb_serial_device_remove()
95 driver = port->serial->type; in usb_serial_device_remove()
96 if (driver->port_remove) in usb_serial_device_remove()
97 driver->port_remove(port); in usb_serial_device_remove()
100 driver->description, minor); in usb_serial_device_remove()
103 usb_autopm_put_interface(port->serial->interface); in usb_serial_device_remove()
110 ssize_t retval = usb_store_new_id(&usb_drv->dynids, usb_drv->id_table, in new_id_store()
113 if (retval >= 0 && usb_drv->usb_driver != NULL) in new_id_store()
114 retval = usb_store_new_id(&usb_drv->usb_driver->dynids, in new_id_store()
115 usb_drv->usb_driver->id_table, in new_id_store()
116 &usb_drv->usb_driver->driver, in new_id_store()
125 return usb_show_dynids(&usb_drv->dynids, buf); in new_id_show()
139 spin_lock(&drv->dynids.lock); in free_dynids()
140 list_for_each_entry_safe(dynid, n, &drv->dynids.list, node) { in free_dynids()
141 list_del(&dynid->node); in free_dynids()
144 spin_unlock(&drv->dynids.lock); in free_dynids()
148 .name = "usb-serial",
159 driver->driver.bus = &usb_serial_bus_type; in usb_serial_bus_register()
160 spin_lock_init(&driver->dynids.lock); in usb_serial_bus_register()
161 INIT_LIST_HEAD(&driver->dynids.list); in usb_serial_bus_register()
163 retval = driver_register(&driver->driver); in usb_serial_bus_register()
171 driver_unregister(&driver->driver); in usb_serial_bus_deregister()