1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2022 Linaro Ltd.
7 #include <linux/slab.h>
8 #include <linux/module.h>
10 #include "icc-common.h"
12 struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data)
14 struct icc_node_data *ndata;
15 struct icc_node *node;
17 node = of_icc_xlate_onecell(spec, data);
19 return ERR_CAST(node);
21 ndata = kzalloc(sizeof(*ndata), GFP_KERNEL);
23 return ERR_PTR(-ENOMEM);
27 if (spec->args_count == 2)
28 ndata->tag = spec->args[1];
30 if (spec->args_count > 2)
31 pr_warn("%pOF: Too many arguments, path tag is not parsed\n", spec->np);
35 EXPORT_SYMBOL_GPL(qcom_icc_xlate_extended);
37 MODULE_LICENSE("GPL");