1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2022 Linaro Ltd.
7 #include <linux/slab.h>
9 #include "icc-common.h"
11 struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data)
13 struct icc_node_data *ndata;
14 struct icc_node *node;
16 node = of_icc_xlate_onecell(spec, data);
18 return ERR_CAST(node);
20 ndata = kzalloc(sizeof(*ndata), GFP_KERNEL);
22 return ERR_PTR(-ENOMEM);
26 if (spec->args_count == 2)
27 ndata->tag = spec->args[1];
29 if (spec->args_count > 2)
30 pr_warn("%pOF: Too many arguments, path tag is not parsed\n", spec->np);
34 EXPORT_SYMBOL_GPL(qcom_icc_xlate_extended);