Skip to content

Commit cc80d10

Browse files
author
Georgi Djakov
committed
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/[email protected] Reviewed-by: Saravana Kannan <[email protected]> Signed-off-by: Georgi Djakov <[email protected]>
1 parent 91e045b commit cc80d10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/linux/interconnect-provider.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ struct icc_node *of_icc_xlate_onecell(struct of_phandle_args *spec,
3838
* @aggregate: pointer to device specific aggregate operation function
3939
* @pre_aggregate: pointer to device specific function that is called
4040
* before the aggregation begins (optional)
41+
* @get_bw: pointer to device specific function to get current bandwidth
4142
* @xlate: provider-specific callback for mapping nodes from phandle arguments
4243
* @dev: the device this interconnect provider belongs to
4344
* @users: count of active users
@@ -51,6 +52,7 @@ struct icc_provider {
5152
int (*aggregate)(struct icc_node *node, u32 tag, u32 avg_bw,
5253
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
5354
void (*pre_aggregate)(struct icc_node *node);
55+
int (*get_bw)(struct icc_node *node, u32 *avg, u32 *peak);
5456
struct icc_node* (*xlate)(struct of_phandle_args *spec, void *data);
5557
struct device *dev;
5658
int users;

0 commit comments

Comments
 (0)