summaryrefslogtreecommitdiff
path: root/include/linux/interconnect-provider.h
diff options
context:
space:
mode:
authorGeorgi Djakov <georgi.djakov@linaro.org>2020-08-25 20:01:50 +0300
committerGeorgi Djakov <georgi.djakov@linaro.org>2020-09-18 08:53:37 +0300
commitcc80d10d6fcf6f47a2a3efe2c4139e50906a4764 (patch)
tree4f2bb44ae8ad6531bb673115a273722d6e231de1 /include/linux/interconnect-provider.h
parent91e045b93db79a2ef66e045ad0d1f8f9d348e1f4 (diff)
downloadlinux-cc80d10d6fcf6f47a2a3efe2c4139e50906a4764.tar.xz
interconnect: Add get_bw() callback
The interconnect controller hardware may support querying the current bandwidth settings, so add a callback for providers to implement this functionality if supported. Link: https://lore.kernel.org/r/20200825170152.6434-2-georgi.djakov@linaro.org Reviewed-by: Saravana Kannan <saravanak@google.com> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Diffstat (limited to 'include/linux/interconnect-provider.h')
-rw-r--r--include/linux/interconnect-provider.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/interconnect-provider.h b/include/linux/interconnect-provider.h
index 4735518de515..520f70fe5a31 100644
--- a/include/linux/interconnect-provider.h
+++ b/include/linux/interconnect-provider.h
@@ -38,6 +38,7 @@ struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
* @aggregate: pointer to device specific aggregate operation function
* @pre_aggregate: pointer to device specific function that is called
* before the aggregation begins (optional)
+ * @get_bw: pointer to device specific function to get current bandwidth
* @xlate: provider-specific callback for mapping nodes from phandle arguments
* @dev: the device this interconnect provider belongs to
* @users: count of active users
@@ -51,6 +52,7 @@ struct icc_provider {
int (*aggregate)(struct icc_node *node, u32 tag, u32 avg_bw,
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
void (*pre_aggregate)(struct icc_node *node);
+ int (*get_bw)(struct icc_node *node, u32 *avg, u32 *peak);
struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data);
struct device *dev;
int users;