summaryrefslogtreecommitdiff
path: root/include/linux/interconnect-provider.h
diff options
context:
space:
mode:
authorGeorgi Djakov <georgi.djakov@linaro.org>2019-11-28 15:48:38 +0200
committerGeorgi Djakov <georgi.djakov@linaro.org>2019-12-16 09:25:24 +0200
commit3172e4d276315afa82c12b14c8dd0db526c7aff1 (patch)
tree877fb52d6afa9e4f3e86dab3bdd5ed41dfbd8c98 /include/linux/interconnect-provider.h
parentc46ab9db64979b0875fff79e1b00013343ca8286 (diff)
interconnect: Add a common standard aggregate function
Currently there is one very standard aggregation method that is used by several drivers. Let's add this as a common function, so that drivers could just point to it, instead of copy/pasting code. Suggested-by: Evan Green <evgreen@chromium.org> Reviewed-by: Brian Masney <masneyb@onstation.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Evan Green <evgreen@chromium.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'include/linux/interconnect-provider.h')
-rw-r--r--include/linux/interconnect-provider.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index 31440c921216..0c494534b4d3 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -92,6 +92,8 @@ struct icc_node {
#if IS_ENABLED(CONFIG_INTERCONNECT)
+int icc_std_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
+ u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
struct icc_node *icc_node_create(int id);
void icc_node_destroy(int id);
int icc_link_create(struct icc_node *node, const int dst_id);
@@ -104,6 +106,12 @@ int icc_provider_del(struct icc_provider *provider);
#else
+static inline int icc_std_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
+ u32 peak_bw, u32 *agg_avg, u32 *agg_peak)
+{
+ return -ENOTSUPP;
+}
+
static inline struct icc_node *icc_node_create(int id)
{
return ERR_PTR(-ENOTSUPP);