aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeorgi Djakov <georgi.djakov@linaro.org>2018-06-25 16:57:39 +0300
committerGeorgi Djakov <georgi.djakov@linaro.org>2019-01-29 15:45:53 +0200
commitee2d649ca2f870011a8231eae53f109fe5073758 (patch)
treef45f2cfc0123fc6e65469ce4b7d65f180dd9829c /include
parentfbf788fed49d1a9253e120817e34a366c5b88733 (diff)
interconnect: Add support for path tags
Consumers may have use cases with different bandwidth requirements based on the system or driver state. The consumer driver can append a specific tag to the path and pass this information to the interconnect platform driver to do the aggregation based on this state. Introduce icc_set_tag() function that will allow the consumers to optionally append tag to each path. The aggregation of these tagged paths is platform specific. Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/interconnect-provider.h4
-rw-r--r--include/linux/interconnect.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index 63caccadc2db..7ea40e82416b 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -45,8 +45,8 @@ struct icc_provider {
struct list_head provider_list;
struct list_head nodes;
int (*set)(struct icc_node *src, struct icc_node *dst);
- int (*aggregate)(struct icc_node *node, u32 avg_bw, u32 peak_bw,
- u32 *agg_avg, u32 *agg_peak);
+ int (*aggregate)(struct icc_node *node, u8 tag, u32 avg_bw,
+ u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data);
struct device *dev;
int users;
diff --git a/include/linux/interconnect.h b/include/linux/interconnect.h
index dc25864755ba..6b51bf118f13 100644
--- a/include/linux/interconnect.h
+++ b/include/linux/interconnect.h
@@ -30,6 +30,7 @@ struct icc_path *icc_get(struct device *dev, const int src_id,
struct icc_path *of_icc_get(struct device *dev, const char *name);
void icc_put(struct icc_path *path);
int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw);
+void icc_set_tag(struct icc_path *path, u8 tag);
#else
@@ -54,6 +55,10 @@ static inline int icc_set_bw(struct icc_path *path, u32 avg_bw, u32 peak_bw)
return 0;
}
+static inline void icc_set_tag(struct icc_path *path, u8 tag)
+{
+}
+
#endif /* CONFIG_INTERCONNECT */
#endif /* __LINUX_INTERCONNECT_H */