diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-05-12 02:13:32 +0200 |
---|---|---|
committer | Georgi Djakov <djakov@kernel.org> | 2023-05-18 18:02:23 +0200 |
commit | 0ac2a08f42ce5c06d5d1216eac59c046961acd4f (patch) | |
tree | d5455a06df1edc59a80906cba7737a86c45de317 /include | |
parent | dt-bindings: interconnect/msm8996-cbf: add defines to be used by CBF (diff) | |
download | linux-0ac2a08f42ce5c06d5d1216eac59c046961acd4f.tar.xz linux-0ac2a08f42ce5c06d5d1216eac59c046961acd4f.zip |
interconnect: add clk-based icc provider support
For some devices it is useful to export clocks as interconnect providers,
if the clock corresponds to bus bandwidth.
For example, on MSM8996 the cluster interconnect clock should be scaled
according to the cluster frequencies. Exporting it as an interconnect
allows one to properly describe this as the cluster bandwidth
requirements.
Tested-by: Yassine Oudjana <y.oudjana@protonmail.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230512001334.2983048-3-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/interconnect-clk.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/interconnect-clk.h b/include/linux/interconnect-clk.h new file mode 100644 index 000000000000..0cd80112bea5 --- /dev/null +++ b/include/linux/interconnect-clk.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2023, Linaro Ltd. + */ + +#ifndef __LINUX_INTERCONNECT_CLK_H +#define __LINUX_INTERCONNECT_CLK_H + +struct device; + +struct icc_clk_data { + struct clk *clk; + const char *name; +}; + +struct icc_provider *icc_clk_register(struct device *dev, + unsigned int first_id, + unsigned int num_clocks, + const struct icc_clk_data *data); +void icc_clk_unregister(struct icc_provider *provider); + +#endif |