D | class.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * USB Role Switch Support 11 #include <linux/usb/role.h> 42 static int connector_bind(struct device *dev, struct device *connector, void *data) in connector_bind() argument 46 ret = sysfs_create_link(&dev->kobj, &connector->kobj, "connector"); in connector_bind() 50 ret = sysfs_create_link(&connector->kobj, &dev->kobj, "usb-role-switch"); in connector_bind() 52 sysfs_remove_link(&dev->kobj, "connector"); in connector_bind() 57 static void connector_unbind(struct device *dev, struct device *connector, void *data) in connector_unbind() argument 59 sysfs_remove_link(&connector->kobj, "usb-role-switch"); in connector_unbind() 60 sysfs_remove_link(&dev->kobj, "connector"); in connector_unbind() [all …]
|