UPSTREAM: 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 append
an optional tag to each path. The aggregation of these tagged paths is
platform specific.

Reviewed-by: Evan Green <evgreen@chromium.org>
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit 127ab2cc5f)
Bug: 140294226
Change-Id: I91fcd279e76ca0e7ea6eb0a60c77ea16750bdb3b
Signed-off-by: Tri Vo <trong@google.com>
This commit is contained in:
Georgi Djakov
2019-08-09 15:13:23 +03:00
committed by Tri Vo
parent 7cbdcba442
commit c01c587910
4 changed files with 31 additions and 4 deletions

View File

@@ -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, u32 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, u32 tag)
{
}
#endif /* CONFIG_INTERCONNECT */
#endif /* __LINUX_INTERCONNECT_H */