summaryrefslogtreecommitdiff
path: root/drivers/interconnect/core.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2020-05-18 14:25:32 +0300
committerViresh Kumar <viresh.kumar@linaro.org>2020-05-29 07:45:12 +0300
commit0430b1d5704b0f0f1d237236dde9c143f8669e49 (patch)
treefedf4057b9559f56478c79910ad4ba0fbc8b0be6 /drivers/interconnect/core.c
parent8b17f17a097bdbc9546f5fdde3098b5f21cbfbff (diff)
downloadlinux-0430b1d5704b0f0f1d237236dde9c143f8669e49.tar.xz
opp: Expose bandwidth information via debugfs
Expose the bandwidth information as well via debugfs. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'drivers/interconnect/core.c')
-rw-r--r--drivers/interconnect/core.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/interconnect/core.c b/drivers/interconnect/core.c
index 2d2e49780511..a56349c14985 100644
--- a/drivers/interconnect/core.c
+++ b/drivers/interconnect/core.c
@@ -515,6 +515,24 @@ void icc_set_tag(struct icc_path *path, u32 tag)
EXPORT_SYMBOL_GPL(icc_set_tag);
/**
+ * icc_get_name() - Get name of the icc path
+ * @path: reference to the path returned by icc_get()
+ *
+ * This function is used by an interconnect consumer to get the name of the icc
+ * path.
+ *
+ * Returns a valid pointer on success, or NULL otherwise.
+ */
+const char *icc_get_name(struct icc_path *path)
+{
+ if (!path)
+ return NULL;
+
+ return path->name;
+}
+EXPORT_SYMBOL_GPL(icc_get_name);
+
+/**
* icc_set_bw() - set bandwidth constraints on an interconnect path
* @path: reference to the path returned by icc_get()
* @avg_bw: average bandwidth in kilobytes per second