Lines Matching +full:drv +full:- +full:2
1 // SPDX-License-Identifier: GPL-2.0+
8 #include <dm/device-internal.h>
10 #include <dm/uclass-internal.h>
19 struct driver *drv; in bind_by_class_index() local
21 drv = lists_driver_lookup_name(drv_name); in bind_by_class_index()
22 if (!drv) { in bind_by_class_index()
24 return -ENOENT; in bind_by_class_index()
30 return -EINVAL; in bind_by_class_index()
39 ret = device_bind_with_driver_data(parent, drv, drv->name, 0, in bind_by_class_index()
57 return -EINVAL; in find_dev()
98 struct driver *drv; in unbind_child_by_class_index() local
100 drv = lists_driver_lookup_name(drv_name); in unbind_child_by_class_index()
101 if (!drv) { in unbind_child_by_class_index()
103 return -ENOENT; in unbind_child_by_class_index()
110 ret = device_chld_remove(parent, drv, DM_REMOVE_NORMAL); in unbind_child_by_class_index()
114 ret = device_chld_unbind(parent, drv); in unbind_child_by_class_index()
127 struct driver *drv; in bind_by_node_path() local
129 drv = lists_driver_lookup_name(drv_name); in bind_by_node_path()
130 if (!drv) { in bind_by_node_path()
132 return -ENOENT; in bind_by_node_path()
138 return -EINVAL; in bind_by_node_path()
149 return -ENODEV; in bind_by_node_path()
153 ret = device_bind_with_driver_data(parent, drv, ofnode_get_name(ofnode), in bind_by_node_path()
172 return -EINVAL; in unbind_by_node_path()
179 return -ENODEV; in unbind_by_node_path()
204 if (argc < 2) in do_bind_unbind()
213 ret = bind_by_node_path(argv[1], argv[2]); in do_bind_unbind()
215 if (argc != 2) in do_bind_unbind()
219 int index = (argc > 2) ? simple_strtoul(argv[2], NULL, 10) : 0; in do_bind_unbind()
225 int index = (argc > 2) ? simple_strtoul(argv[2], NULL, 10) : 0; in do_bind_unbind()