mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
interconnect: qcom: Implement xlate_extended() to parse tags
Implement a function to parse the arguments of the "interconnects" DT property and populate the interconnect path tags if this information is available. Tested-by: Sibi Sankar <sibis@codeaurora.org> Reviewed-by: Sibi Sankar <sibis@codeaurora.org> Link: https://lore.kernel.org/r/20200903133134.17201-4-georgi.djakov@linaro.org Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
#include <linux/interconnect.h>
|
#include <linux/interconnect.h>
|
||||||
#include <linux/interconnect-provider.h>
|
#include <linux/interconnect-provider.h>
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
|
#include <linux/of.h>
|
||||||
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#include "bcm-voter.h"
|
#include "bcm-voter.h"
|
||||||
#include "icc-rpmh.h"
|
#include "icc-rpmh.h"
|
||||||
@@ -92,6 +94,31 @@ int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
|
|||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(qcom_icc_set);
|
EXPORT_SYMBOL_GPL(qcom_icc_set);
|
||||||
|
|
||||||
|
struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data)
|
||||||
|
{
|
||||||
|
struct icc_node_data *ndata;
|
||||||
|
struct icc_node *node;
|
||||||
|
|
||||||
|
node = of_icc_xlate_onecell(spec, data);
|
||||||
|
if (IS_ERR(node))
|
||||||
|
return ERR_CAST(node);
|
||||||
|
|
||||||
|
ndata = kzalloc(sizeof(*ndata), GFP_KERNEL);
|
||||||
|
if (!ndata)
|
||||||
|
return ERR_PTR(-ENOMEM);
|
||||||
|
|
||||||
|
ndata->node = node;
|
||||||
|
|
||||||
|
if (spec->args_count == 2)
|
||||||
|
ndata->tag = spec->args[1];
|
||||||
|
|
||||||
|
if (spec->args_count > 2)
|
||||||
|
pr_warn("%pOF: Too many arguments, path tag is not parsed\n", spec->np);
|
||||||
|
|
||||||
|
return ndata;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(qcom_icc_xlate_extended);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* qcom_icc_bcm_init - populates bcm aux data and connect qnodes
|
* qcom_icc_bcm_init - populates bcm aux data and connect qnodes
|
||||||
* @bcm: bcm to be initialized
|
* @bcm: bcm to be initialized
|
||||||
|
@@ -131,6 +131,7 @@ struct qcom_icc_desc {
|
|||||||
int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
int qcom_icc_aggregate(struct icc_node *node, u32 tag, u32 avg_bw,
|
||||||
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
|
u32 peak_bw, u32 *agg_avg, u32 *agg_peak);
|
||||||
int qcom_icc_set(struct icc_node *src, struct icc_node *dst);
|
int qcom_icc_set(struct icc_node *src, struct icc_node *dst);
|
||||||
|
struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data);
|
||||||
int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev);
|
int qcom_icc_bcm_init(struct qcom_icc_bcm *bcm, struct device *dev);
|
||||||
void qcom_icc_pre_aggregate(struct icc_node *node);
|
void qcom_icc_pre_aggregate(struct icc_node *node);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user