1 // SPDX-License-Identifier: GPL-2.0
3 * Interconnect framework core driver
5 * Copyright (c) 2017-2019, Linaro Ltd.
6 * Author: Georgi Djakov <georgi.djakov@linaro.org>
9 #include <linux/debugfs.h>
10 #include <linux/device.h>
11 #include <linux/idr.h>
12 #include <linux/init.h>
13 #include <linux/interconnect.h>
14 #include <linux/interconnect-provider.h>
15 #include <linux/list.h>
16 #include <linux/module.h>
17 #include <linux/mutex.h>
18 #include <linux/slab.h>
20 #include <linux/overflow.h>
24 #define CREATE_TRACE_POINTS
27 static DEFINE_IDR(icc_idr);
28 static LIST_HEAD(icc_providers);
29 static DEFINE_MUTEX(icc_lock);
30 static struct dentry *icc_debugfs_dir;
32 static void icc_summary_show_one(struct seq_file *s, struct icc_node *n)
37 seq_printf(s, "%-42s %12u %12u\n",
38 n->name, n->avg_bw, n->peak_bw);
41 static int icc_summary_show(struct seq_file *s, void *data)
43 struct icc_provider *provider;
45 seq_puts(s, " node tag avg peak\n");
46 seq_puts(s, "--------------------------------------------------------------------\n");
48 mutex_lock(&icc_lock);
50 list_for_each_entry(provider, &icc_providers, provider_list) {
53 list_for_each_entry(n, &provider->nodes, node_list) {
56 icc_summary_show_one(s, n);
57 hlist_for_each_entry(r, &n->req_list, req_node) {
61 seq_printf(s, " %-27s %12u %12u %12u\n",
62 dev_name(r->dev), r->tag, r->avg_bw,
68 mutex_unlock(&icc_lock);
72 DEFINE_SHOW_ATTRIBUTE(icc_summary);
74 static void icc_graph_show_link(struct seq_file *s, int level,
75 struct icc_node *n, struct icc_node *m)
77 seq_printf(s, "%s\"%d:%s\" -> \"%d:%s\"\n",
78 level == 2 ? "\t\t" : "\t",
79 n->id, n->name, m->id, m->name);
82 static void icc_graph_show_node(struct seq_file *s, struct icc_node *n)
84 seq_printf(s, "\t\t\"%d:%s\" [label=\"%d:%s",
85 n->id, n->name, n->id, n->name);
86 seq_printf(s, "\n\t\t\t|avg_bw=%ukBps", n->avg_bw);
87 seq_printf(s, "\n\t\t\t|peak_bw=%ukBps", n->peak_bw);
91 static int icc_graph_show(struct seq_file *s, void *data)
93 struct icc_provider *provider;
95 int cluster_index = 0;
98 seq_puts(s, "digraph {\n\trankdir = LR\n\tnode [shape = record]\n");
99 mutex_lock(&icc_lock);
101 /* draw providers as cluster subgraphs */
103 list_for_each_entry(provider, &icc_providers, provider_list) {
104 seq_printf(s, "\tsubgraph cluster_%d {\n", ++cluster_index);
106 seq_printf(s, "\t\tlabel = \"%s\"\n",
107 dev_name(provider->dev));
110 list_for_each_entry(n, &provider->nodes, node_list)
111 icc_graph_show_node(s, n);
113 /* draw internal links */
114 list_for_each_entry(n, &provider->nodes, node_list)
115 for (i = 0; i < n->num_links; ++i)
116 if (n->provider == n->links[i]->provider)
117 icc_graph_show_link(s, 2, n,
120 seq_puts(s, "\t}\n");
123 /* draw external links */
124 list_for_each_entry(provider, &icc_providers, provider_list)
125 list_for_each_entry(n, &provider->nodes, node_list)
126 for (i = 0; i < n->num_links; ++i)
127 if (n->provider != n->links[i]->provider)
128 icc_graph_show_link(s, 1, n,
131 mutex_unlock(&icc_lock);
136 DEFINE_SHOW_ATTRIBUTE(icc_graph);
138 static struct icc_node *node_find(const int id)
140 return idr_find(&icc_idr, id);
143 static struct icc_path *path_init(struct device *dev, struct icc_node *dst,
146 struct icc_node *node = dst;
147 struct icc_path *path;
150 path = kzalloc(struct_size(path, reqs, num_nodes), GFP_KERNEL);
152 return ERR_PTR(-ENOMEM);
154 path->num_nodes = num_nodes;
156 for (i = num_nodes - 1; i >= 0; i--) {
157 node->provider->users++;
158 hlist_add_head(&path->reqs[i].req_node, &node->req_list);
159 path->reqs[i].node = node;
160 path->reqs[i].dev = dev;
161 path->reqs[i].enabled = true;
162 /* reference to previous node was saved during path traversal */
163 node = node->reverse;
169 static struct icc_path *path_find(struct device *dev, struct icc_node *src,
170 struct icc_node *dst)
172 struct icc_path *path = ERR_PTR(-EPROBE_DEFER);
173 struct icc_node *n, *node = NULL;
174 struct list_head traverse_list;
175 struct list_head edge_list;
176 struct list_head visited_list;
180 INIT_LIST_HEAD(&traverse_list);
181 INIT_LIST_HEAD(&edge_list);
182 INIT_LIST_HEAD(&visited_list);
184 list_add(&src->search_list, &traverse_list);
188 list_for_each_entry_safe(node, n, &traverse_list, search_list) {
191 list_splice_init(&edge_list, &visited_list);
192 list_splice_init(&traverse_list, &visited_list);
195 for (i = 0; i < node->num_links; i++) {
196 struct icc_node *tmp = node->links[i];
199 path = ERR_PTR(-ENOENT);
203 if (tmp->is_traversed)
206 tmp->is_traversed = true;
208 list_add_tail(&tmp->search_list, &edge_list);
215 list_splice_init(&traverse_list, &visited_list);
216 list_splice_init(&edge_list, &traverse_list);
218 /* count the hops including the source */
221 } while (!list_empty(&traverse_list));
225 /* reset the traversed state */
226 list_for_each_entry_reverse(n, &visited_list, search_list)
227 n->is_traversed = false;
230 path = path_init(dev, dst, depth);
236 * We want the path to honor all bandwidth requests, so the average and peak
237 * bandwidth requirements from each consumer are aggregated at each node.
238 * The aggregation is platform specific, so each platform can customize it by
239 * implementing its own aggregate() function.
242 static int aggregate_requests(struct icc_node *node)
244 struct icc_provider *p = node->provider;
251 if (p->pre_aggregate)
252 p->pre_aggregate(node);
254 hlist_for_each_entry(r, &node->req_list, req_node) {
257 peak_bw = r->peak_bw;
262 p->aggregate(node, r->tag, avg_bw, peak_bw,
263 &node->avg_bw, &node->peak_bw);
269 static int apply_constraints(struct icc_path *path)
271 struct icc_node *next, *prev = NULL;
272 struct icc_provider *p;
276 for (i = 0; i < path->num_nodes; i++) {
277 next = path->reqs[i].node;
280 /* both endpoints should be valid master-slave pairs */
281 if (!prev || (p != prev->provider && !p->inter_set)) {
286 /* set the constraints */
287 ret = p->set(prev, next);
297 int icc_std_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
298 u32 peak_bw, u32 *agg_avg, u32 *agg_peak)
301 *agg_peak = max(*agg_peak, peak_bw);
305 EXPORT_SYMBOL_GPL(icc_std_aggregate);
307 /* of_icc_xlate_onecell() - Translate function using a single index.
308 * @spec: OF phandle args to map into an interconnect node.
309 * @data: private data (pointer to struct icc_onecell_data)
311 * This is a generic translate function that can be used to model simple
312 * interconnect providers that have one device tree node and provide
313 * multiple interconnect nodes. A single cell is used as an index into
314 * an array of icc nodes specified in the icc_onecell_data struct when
315 * registering the provider.
317 struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
320 struct icc_onecell_data *icc_data = data;
321 unsigned int idx = spec->args[0];
323 if (idx >= icc_data->num_nodes) {
324 pr_err("%s: invalid index %u\n", __func__, idx);
325 return ERR_PTR(-EINVAL);
328 return icc_data->nodes[idx];
330 EXPORT_SYMBOL_GPL(of_icc_xlate_onecell);
333 * of_icc_get_from_provider() - Look-up interconnect node
334 * @spec: OF phandle args to use for look-up
336 * Looks for interconnect provider under the node specified by @spec and if
337 * found, uses xlate function of the provider to map phandle args to node.
339 * Returns a valid pointer to struct icc_node on success or ERR_PTR()
342 struct icc_node *of_icc_get_from_provider(struct of_phandle_args *spec)
344 struct icc_node *node = ERR_PTR(-EPROBE_DEFER);
345 struct icc_provider *provider;
348 return ERR_PTR(-EINVAL);
350 mutex_lock(&icc_lock);
351 list_for_each_entry(provider, &icc_providers, provider_list) {
352 if (provider->dev->of_node == spec->np)
353 node = provider->xlate(spec, provider->data);
357 mutex_unlock(&icc_lock);
361 EXPORT_SYMBOL_GPL(of_icc_get_from_provider);
363 static void devm_icc_release(struct device *dev, void *res)
365 icc_put(*(struct icc_path **)res);
368 struct icc_path *devm_of_icc_get(struct device *dev, const char *name)
370 struct icc_path **ptr, *path;
372 ptr = devres_alloc(devm_icc_release, sizeof(**ptr), GFP_KERNEL);
374 return ERR_PTR(-ENOMEM);
376 path = of_icc_get(dev, name);
379 devres_add(dev, ptr);
386 EXPORT_SYMBOL_GPL(devm_of_icc_get);
389 * of_icc_get_by_index() - get a path handle from a DT node based on index
390 * @dev: device pointer for the consumer device
391 * @idx: interconnect path index
393 * This function will search for a path between two endpoints and return an
394 * icc_path handle on success. Use icc_put() to release constraints when they
395 * are not needed anymore.
396 * If the interconnect API is disabled, NULL is returned and the consumer
397 * drivers will still build. Drivers are free to handle this specifically,
398 * but they don't have to.
400 * Return: icc_path pointer on success or ERR_PTR() on error. NULL is returned
401 * when the API is disabled or the "interconnects" DT property is missing.
403 struct icc_path *of_icc_get_by_index(struct device *dev, int idx)
405 struct icc_path *path;
406 struct icc_node *src_node, *dst_node;
407 struct device_node *np;
408 struct of_phandle_args src_args, dst_args;
411 if (!dev || !dev->of_node)
412 return ERR_PTR(-ENODEV);
417 * When the consumer DT node do not have "interconnects" property
418 * return a NULL path to skip setting constraints.
420 if (!of_find_property(np, "interconnects", NULL))
424 * We use a combination of phandle and specifier for endpoint. For now
425 * lets support only global ids and extend this in the future if needed
426 * without breaking DT compatibility.
428 ret = of_parse_phandle_with_args(np, "interconnects",
429 "#interconnect-cells", idx * 2,
434 of_node_put(src_args.np);
436 ret = of_parse_phandle_with_args(np, "interconnects",
437 "#interconnect-cells", idx * 2 + 1,
442 of_node_put(dst_args.np);
444 src_node = of_icc_get_from_provider(&src_args);
446 if (IS_ERR(src_node)) {
447 if (PTR_ERR(src_node) != -EPROBE_DEFER)
448 dev_err(dev, "error finding src node: %ld\n",
450 return ERR_CAST(src_node);
453 dst_node = of_icc_get_from_provider(&dst_args);
455 if (IS_ERR(dst_node)) {
456 if (PTR_ERR(dst_node) != -EPROBE_DEFER)
457 dev_err(dev, "error finding dst node: %ld\n",
459 return ERR_CAST(dst_node);
462 mutex_lock(&icc_lock);
463 path = path_find(dev, src_node, dst_node);
464 mutex_unlock(&icc_lock);
466 dev_err(dev, "%s: invalid path=%ld\n", __func__, PTR_ERR(path));
470 path->name = kasprintf(GFP_KERNEL, "%s-%s",
471 src_node->name, dst_node->name);
474 return ERR_PTR(-ENOMEM);
479 EXPORT_SYMBOL_GPL(of_icc_get_by_index);
482 * of_icc_get() - get a path handle from a DT node based on name
483 * @dev: device pointer for the consumer device
484 * @name: interconnect path name
486 * This function will search for a path between two endpoints and return an
487 * icc_path handle on success. Use icc_put() to release constraints when they
488 * are not needed anymore.
489 * If the interconnect API is disabled, NULL is returned and the consumer
490 * drivers will still build. Drivers are free to handle this specifically,
491 * but they don't have to.
493 * Return: icc_path pointer on success or ERR_PTR() on error. NULL is returned
494 * when the API is disabled or the "interconnects" DT property is missing.
496 struct icc_path *of_icc_get(struct device *dev, const char *name)
498 struct device_node *np;
501 if (!dev || !dev->of_node)
502 return ERR_PTR(-ENODEV);
507 * When the consumer DT node do not have "interconnects" property
508 * return a NULL path to skip setting constraints.
510 if (!of_find_property(np, "interconnects", NULL))
514 * We use a combination of phandle and specifier for endpoint. For now
515 * lets support only global ids and extend this in the future if needed
516 * without breaking DT compatibility.
519 idx = of_property_match_string(np, "interconnect-names", name);
524 return of_icc_get_by_index(dev, idx);
526 EXPORT_SYMBOL_GPL(of_icc_get);
529 * icc_set_tag() - set an optional tag on a path
530 * @path: the path we want to tag
531 * @tag: the tag value
533 * This function allows consumers to append a tag to the requests associated
534 * with a path, so that a different aggregation could be done based on this tag.
536 void icc_set_tag(struct icc_path *path, u32 tag)
543 mutex_lock(&icc_lock);
545 for (i = 0; i < path->num_nodes; i++)
546 path->reqs[i].tag = tag;
548 mutex_unlock(&icc_lock);
550 EXPORT_SYMBOL_GPL(icc_set_tag);
553 * icc_get_name() - Get name of the icc path
554 * @path: reference to the path returned by icc_get()
556 * This function is used by an interconnect consumer to get the name of the icc
559 * Returns a valid pointer on success, or NULL otherwise.
561 const char *icc_get_name(struct icc_path *path)
568 EXPORT_SYMBOL_GPL(icc_get_name);
571 * icc_set_bw() - set bandwidth constraints on an interconnect path
572 * @path: reference to the path returned by icc_get()
573 * @avg_bw: average bandwidth in kilobytes per second
574 * @peak_bw: peak bandwidth in kilobytes per second
576 * This function is used by an interconnect consumer to express its own needs
577 * in terms of bandwidth for a previously requested path between two endpoints.
578 * The requests are aggregated and each node is updated accordingly. The entire
579 * path is locked by a mutex to ensure that the set() is completed.
580 * The @path can be NULL when the "interconnects" DT properties is missing,
581 * which will mean that no constraints will be set.
583 * Returns 0 on success, or an appropriate error code otherwise.
585 int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
587 struct icc_node *node;
588 u32 old_avg, old_peak;
595 if (WARN_ON(IS_ERR(path) || !path->num_nodes))
598 mutex_lock(&icc_lock);
600 old_avg = path->reqs[0].avg_bw;
601 old_peak = path->reqs[0].peak_bw;
603 for (i = 0; i < path->num_nodes; i++) {
604 node = path->reqs[i].node;
606 /* update the consumer request for this path */
607 path->reqs[i].avg_bw = avg_bw;
608 path->reqs[i].peak_bw = peak_bw;
610 /* aggregate requests for this node */
611 aggregate_requests(node);
613 trace_icc_set_bw(path, node, i, avg_bw, peak_bw);
616 ret = apply_constraints(path);
618 pr_debug("interconnect: error applying constraints (%d)\n",
621 for (i = 0; i < path->num_nodes; i++) {
622 node = path->reqs[i].node;
623 path->reqs[i].avg_bw = old_avg;
624 path->reqs[i].peak_bw = old_peak;
625 aggregate_requests(node);
627 apply_constraints(path);
630 mutex_unlock(&icc_lock);
632 trace_icc_set_bw_end(path, ret);
636 EXPORT_SYMBOL_GPL(icc_set_bw);
638 static int __icc_enable(struct icc_path *path, bool enable)
645 if (WARN_ON(IS_ERR(path) || !path->num_nodes))
648 mutex_lock(&icc_lock);
650 for (i = 0; i < path->num_nodes; i++)
651 path->reqs[i].enabled = enable;
653 mutex_unlock(&icc_lock);
655 return icc_set_bw(path, path->reqs[0].avg_bw,
656 path->reqs[0].peak_bw);
659 int icc_enable(struct icc_path *path)
661 return __icc_enable(path, true);
663 EXPORT_SYMBOL_GPL(icc_enable);
665 int icc_disable(struct icc_path *path)
667 return __icc_enable(path, false);
669 EXPORT_SYMBOL_GPL(icc_disable);
672 * icc_get() - return a handle for path between two endpoints
673 * @dev: the device requesting the path
674 * @src_id: source device port id
675 * @dst_id: destination device port id
677 * This function will search for a path between two endpoints and return an
678 * icc_path handle on success. Use icc_put() to release
679 * constraints when they are not needed anymore.
680 * If the interconnect API is disabled, NULL is returned and the consumer
681 * drivers will still build. Drivers are free to handle this specifically,
682 * but they don't have to.
684 * Return: icc_path pointer on success, ERR_PTR() on error or NULL if the
685 * interconnect API is disabled.
687 struct icc_path *icc_get(struct device *dev, const int src_id, const int dst_id)
689 struct icc_node *src, *dst;
690 struct icc_path *path = ERR_PTR(-EPROBE_DEFER);
692 mutex_lock(&icc_lock);
694 src = node_find(src_id);
698 dst = node_find(dst_id);
702 path = path_find(dev, src, dst);
704 dev_err(dev, "%s: invalid path=%ld\n", __func__, PTR_ERR(path));
708 path->name = kasprintf(GFP_KERNEL, "%s-%s", src->name, dst->name);
711 path = ERR_PTR(-ENOMEM);
714 mutex_unlock(&icc_lock);
717 EXPORT_SYMBOL_GPL(icc_get);
720 * icc_put() - release the reference to the icc_path
721 * @path: interconnect path
723 * Use this function to release the constraints on a path when the path is
724 * no longer needed. The constraints will be re-aggregated.
726 void icc_put(struct icc_path *path)
728 struct icc_node *node;
732 if (!path || WARN_ON(IS_ERR(path)))
735 ret = icc_set_bw(path, 0, 0);
737 pr_err("%s: error (%d)\n", __func__, ret);
739 mutex_lock(&icc_lock);
740 for (i = 0; i < path->num_nodes; i++) {
741 node = path->reqs[i].node;
742 hlist_del(&path->reqs[i].req_node);
743 if (!WARN_ON(!node->provider->users))
744 node->provider->users--;
746 mutex_unlock(&icc_lock);
748 kfree_const(path->name);
751 EXPORT_SYMBOL_GPL(icc_put);
753 static struct icc_node *icc_node_create_nolock(int id)
755 struct icc_node *node;
757 /* check if node already exists */
758 node = node_find(id);
762 node = kzalloc(sizeof(*node), GFP_KERNEL);
764 return ERR_PTR(-ENOMEM);
766 id = idr_alloc(&icc_idr, node, id, id + 1, GFP_KERNEL);
768 WARN(1, "%s: couldn't get idr\n", __func__);
779 * icc_node_create() - create a node
782 * Return: icc_node pointer on success, or ERR_PTR() on error
784 struct icc_node *icc_node_create(int id)
786 struct icc_node *node;
788 mutex_lock(&icc_lock);
790 node = icc_node_create_nolock(id);
792 mutex_unlock(&icc_lock);
796 EXPORT_SYMBOL_GPL(icc_node_create);
799 * icc_node_destroy() - destroy a node
802 void icc_node_destroy(int id)
804 struct icc_node *node;
806 mutex_lock(&icc_lock);
808 node = node_find(id);
810 idr_remove(&icc_idr, node->id);
811 WARN_ON(!hlist_empty(&node->req_list));
814 mutex_unlock(&icc_lock);
818 EXPORT_SYMBOL_GPL(icc_node_destroy);
821 * icc_link_create() - create a link between two nodes
822 * @node: source node id
823 * @dst_id: destination node id
825 * Create a link between two nodes. The nodes might belong to different
826 * interconnect providers and the @dst_id node might not exist (if the
827 * provider driver has not probed yet). So just create the @dst_id node
828 * and when the actual provider driver is probed, the rest of the node
831 * Return: 0 on success, or an error code otherwise
833 int icc_link_create(struct icc_node *node, const int dst_id)
835 struct icc_node *dst;
836 struct icc_node **new;
842 mutex_lock(&icc_lock);
844 dst = node_find(dst_id);
846 dst = icc_node_create_nolock(dst_id);
854 new = krealloc(node->links,
855 (node->num_links + 1) * sizeof(*node->links),
863 node->links[node->num_links++] = dst;
866 mutex_unlock(&icc_lock);
870 EXPORT_SYMBOL_GPL(icc_link_create);
873 * icc_link_destroy() - destroy a link between two nodes
874 * @src: pointer to source node
875 * @dst: pointer to destination node
877 * Return: 0 on success, or an error code otherwise
879 int icc_link_destroy(struct icc_node *src, struct icc_node *dst)
881 struct icc_node **new;
885 if (IS_ERR_OR_NULL(src))
888 if (IS_ERR_OR_NULL(dst))
891 mutex_lock(&icc_lock);
893 for (slot = 0; slot < src->num_links; slot++)
894 if (src->links[slot] == dst)
897 if (WARN_ON(slot == src->num_links)) {
902 src->links[slot] = src->links[--src->num_links];
904 new = krealloc(src->links, src->num_links * sizeof(*src->links),
910 mutex_unlock(&icc_lock);
914 EXPORT_SYMBOL_GPL(icc_link_destroy);
917 * icc_node_add() - add interconnect node to interconnect provider
918 * @node: pointer to the interconnect node
919 * @provider: pointer to the interconnect provider
921 void icc_node_add(struct icc_node *node, struct icc_provider *provider)
923 mutex_lock(&icc_lock);
925 node->provider = provider;
926 list_add_tail(&node->node_list, &provider->nodes);
928 mutex_unlock(&icc_lock);
930 EXPORT_SYMBOL_GPL(icc_node_add);
933 * icc_node_del() - delete interconnect node from interconnect provider
934 * @node: pointer to the interconnect node
936 void icc_node_del(struct icc_node *node)
938 mutex_lock(&icc_lock);
940 list_del(&node->node_list);
942 mutex_unlock(&icc_lock);
944 EXPORT_SYMBOL_GPL(icc_node_del);
947 * icc_nodes_remove() - remove all previously added nodes from provider
948 * @provider: the interconnect provider we are removing nodes from
950 * Return: 0 on success, or an error code otherwise
952 int icc_nodes_remove(struct icc_provider *provider)
954 struct icc_node *n, *tmp;
956 if (WARN_ON(IS_ERR_OR_NULL(provider)))
959 list_for_each_entry_safe_reverse(n, tmp, &provider->nodes, node_list) {
961 icc_node_destroy(n->id);
966 EXPORT_SYMBOL_GPL(icc_nodes_remove);
969 * icc_provider_add() - add a new interconnect provider
970 * @provider: the interconnect provider that will be added into topology
972 * Return: 0 on success, or an error code otherwise
974 int icc_provider_add(struct icc_provider *provider)
976 if (WARN_ON(!provider->set))
978 if (WARN_ON(!provider->xlate))
981 mutex_lock(&icc_lock);
983 INIT_LIST_HEAD(&provider->nodes);
984 list_add_tail(&provider->provider_list, &icc_providers);
986 mutex_unlock(&icc_lock);
988 dev_dbg(provider->dev, "interconnect provider added to topology\n");
992 EXPORT_SYMBOL_GPL(icc_provider_add);
995 * icc_provider_del() - delete previously added interconnect provider
996 * @provider: the interconnect provider that will be removed from topology
998 * Return: 0 on success, or an error code otherwise
1000 int icc_provider_del(struct icc_provider *provider)
1002 mutex_lock(&icc_lock);
1003 if (provider->users) {
1004 pr_warn("interconnect provider still has %d users\n",
1006 mutex_unlock(&icc_lock);
1010 if (!list_empty(&provider->nodes)) {
1011 pr_warn("interconnect provider still has nodes\n");
1012 mutex_unlock(&icc_lock);
1016 list_del(&provider->provider_list);
1017 mutex_unlock(&icc_lock);
1021 EXPORT_SYMBOL_GPL(icc_provider_del);
1023 static int __init icc_init(void)
1025 icc_debugfs_dir = debugfs_create_dir("interconnect", NULL);
1026 debugfs_create_file("interconnect_summary", 0444,
1027 icc_debugfs_dir, NULL, &icc_summary_fops);
1028 debugfs_create_file("interconnect_graph", 0444,
1029 icc_debugfs_dir, NULL, &icc_graph_fops);
1033 device_initcall(icc_init);
1035 MODULE_AUTHOR("Georgi Djakov <georgi.djakov@linaro.org>");
1036 MODULE_DESCRIPTION("Interconnect Driver Core");
1037 MODULE_LICENSE("GPL v2");