Lines Matching full:provider
14 #include <linux/interconnect-provider.h>
45 struct icc_provider *provider; in icc_summary_show() local
52 list_for_each_entry(provider, &icc_providers, provider_list) { in icc_summary_show()
55 list_for_each_entry(n, &provider->nodes, node_list) { in icc_summary_show()
101 struct icc_provider *provider; in icc_graph_show() local
111 list_for_each_entry(provider, &icc_providers, provider_list) { in icc_graph_show()
113 if (provider->dev) in icc_graph_show()
115 dev_name(provider->dev)); in icc_graph_show()
118 list_for_each_entry(n, &provider->nodes, node_list) in icc_graph_show()
122 list_for_each_entry(n, &provider->nodes, node_list) in icc_graph_show()
124 if (n->provider == n->links[i]->provider) in icc_graph_show()
132 list_for_each_entry(provider, &icc_providers, provider_list) in icc_graph_show()
133 list_for_each_entry(n, &provider->nodes, node_list) in icc_graph_show()
135 if (n->provider != n->links[i]->provider) in icc_graph_show()
153 struct icc_provider *provider; in node_find_by_name() local
156 list_for_each_entry(provider, &icc_providers, provider_list) { in node_find_by_name()
157 list_for_each_entry(n, &provider->nodes, node_list) { in node_find_by_name()
182 node->provider->users++; in path_init()
271 struct icc_provider *p = node->provider; in aggregate_requests()
311 p = next->provider; in apply_constraints()
314 if (!prev || (p != prev->provider && !p->inter_set)) { in apply_constraints()
348 * registering the provider.
369 * Looks for interconnect provider under the node specified by @spec and if
370 * found, uses xlate function of the provider to map phandle args to node.
379 struct icc_provider *provider; in of_icc_get_from_provider() local
385 list_for_each_entry(provider, &icc_providers, provider_list) { in of_icc_get_from_provider()
386 if (provider->dev->of_node == spec->np) { in of_icc_get_from_provider()
387 if (provider->xlate_extended) { in of_icc_get_from_provider()
388 data = provider->xlate_extended(spec, provider->data); in of_icc_get_from_provider()
394 node = provider->xlate(spec, provider->data); in of_icc_get_from_provider()
804 if (!WARN_ON(!node->provider->users)) in icc_put()
805 node->provider->users--; in icc_put()
894 * provider driver has not probed yet). So just create the @dst_id node
895 * and when the actual provider driver is probed, the rest of the node
906 if (!node->provider) in icc_link_create()
940 * icc_node_add() - add interconnect node to interconnect provider
942 * @provider: pointer to the interconnect provider
944 void icc_node_add(struct icc_node *node, struct icc_provider *provider) in icc_node_add() argument
946 if (WARN_ON(node->provider)) in icc_node_add()
952 node->provider = provider; in icc_node_add()
953 list_add_tail(&node->node_list, &provider->nodes); in icc_node_add()
956 if (provider->get_bw) { in icc_node_add()
957 provider->get_bw(node, &node->init_avg, &node->init_peak); in icc_node_add()
966 if (provider->pre_aggregate) in icc_node_add()
967 provider->pre_aggregate(node); in icc_node_add()
969 if (provider->aggregate) in icc_node_add()
970 provider->aggregate(node, 0, node->init_avg, node->init_peak, in icc_node_add()
972 if (provider->set) in icc_node_add()
973 provider->set(node, node); in icc_node_add()
985 * icc_node_del() - delete interconnect node from interconnect provider
999 * icc_nodes_remove() - remove all previously added nodes from provider
1000 * @provider: the interconnect provider we are removing nodes from
1004 int icc_nodes_remove(struct icc_provider *provider) in icc_nodes_remove() argument
1008 if (WARN_ON(IS_ERR_OR_NULL(provider))) in icc_nodes_remove()
1011 list_for_each_entry_safe_reverse(n, tmp, &provider->nodes, node_list) { in icc_nodes_remove()
1021 * icc_provider_init() - initialize a new interconnect provider
1022 * @provider: the interconnect provider to initialize
1024 * Must be called before adding nodes to the provider.
1026 void icc_provider_init(struct icc_provider *provider) in icc_provider_init() argument
1028 WARN_ON(!provider->set); in icc_provider_init()
1030 INIT_LIST_HEAD(&provider->nodes); in icc_provider_init()
1035 * icc_provider_register() - register a new interconnect provider
1036 * @provider: the interconnect provider to register
1040 int icc_provider_register(struct icc_provider *provider) in icc_provider_register() argument
1042 if (WARN_ON(!provider->xlate && !provider->xlate_extended)) in icc_provider_register()
1046 list_add_tail(&provider->provider_list, &icc_providers); in icc_provider_register()
1049 dev_dbg(provider->dev, "interconnect provider registered\n"); in icc_provider_register()
1056 * icc_provider_deregister() - deregister an interconnect provider
1057 * @provider: the interconnect provider to deregister
1059 void icc_provider_deregister(struct icc_provider *provider) in icc_provider_deregister() argument
1062 WARN_ON(provider->users); in icc_provider_deregister()
1064 list_del(&provider->provider_list); in icc_provider_deregister()
1108 dev_dbg(p->dev, "interconnect provider is in synced state\n"); in icc_sync_state()