linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Kaehlcke <mka@chromium.org>
To: Georgi Djakov <georgi.djakov@linaro.org>
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	bjorn.andersson@linaro.org, robh+dt@kernel.org,
	sibis@codeaurora.org, dianders@chromium.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/6] interconnect: qcom: Implement xlate_extended() to parse tags
Date: Mon, 27 Jul 2020 13:19:55 -0700	[thread overview]
Message-ID: <20200727201955.GF3191083@google.com> (raw)
In-Reply-To: <20200723130942.28491-3-georgi.djakov@linaro.org>

On Thu, Jul 23, 2020 at 04:09:38PM +0300, Georgi Djakov wrote:
> Implement a function to parse the arguments of the "interconnects" DT
> property and populate the interconnect path tags if this information
> is available.
> 
> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
> ---
>  drivers/interconnect/qcom/icc-rpmh.c | 27 +++++++++++++++++++++++++++
>  drivers/interconnect/qcom/icc-rpmh.h |  1 +
>  2 files changed, 28 insertions(+)
> 
> diff --git a/drivers/interconnect/qcom/icc-rpmh.c b/drivers/interconnect/qcom/icc-rpmh.c
> index 3ac5182c9ab2..44144fabec32 100644
> --- a/drivers/interconnect/qcom/icc-rpmh.c
> +++ b/drivers/interconnect/qcom/icc-rpmh.c
> @@ -6,6 +6,8 @@
>  #include <linux/interconnect.h>
>  #include <linux/interconnect-provider.h>
>  #include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/slab.h>
>  
>  #include "bcm-voter.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);
>  
> +struct icc_node_data *qcom_icc_xlate_extended(struct of_phandle_args *spec, void *data)
> +{
> +	struct icc_node_data *ndata;
> +	struct icc_node *node;
> +
> +	if (!spec)
> +		return ERR_PTR(-EINVAL);
> +
> +	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];

Would a higher number of arguments (currently) be an error? Is so,
should it be reported?

  parent reply	other threads:[~2020-07-27 20:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23 13:09 [PATCH 0/6] interconnect: Introduce xlate_extended() Georgi Djakov
2020-07-23 13:09 ` [PATCH 1/6] interconnect: Introduce xlate_extended() callback Georgi Djakov
2020-07-27 10:51   ` Sibi Sankar
2020-07-27 20:10   ` Matthias Kaehlcke
2020-07-23 13:09 ` [PATCH 2/6] interconnect: qcom: Implement xlate_extended() to parse tags Georgi Djakov
2020-07-27 14:47   ` Sibi Sankar
2020-07-27 20:19   ` Matthias Kaehlcke [this message]
2020-07-23 13:09 ` [PATCH 3/6] interconnect: qcom: sdm845: Replace xlate with xlate_extended Georgi Djakov
2020-07-27 10:54   ` Sibi Sankar
2020-07-27 20:51   ` Matthias Kaehlcke
2020-07-23 13:09 ` [PATCH 4/6] arm64: dts: qcom: sdm845: Increase the number of interconnect cells Georgi Djakov
2020-07-27 10:58   ` Sibi Sankar
2020-07-27 20:55     ` Matthias Kaehlcke
2020-07-23 13:09 ` [PATCH 5/6] interconnect: qcom: sc7180: Replace xlate with xlate_extended Georgi Djakov
2020-07-27 20:58   ` Matthias Kaehlcke
2020-07-23 13:09 ` [PATCH 6/6] arm64: dts: qcom: sc7180: Increase the number of interconnect cells Georgi Djakov
2020-07-27 21:06   ` Matthias Kaehlcke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200727201955.GF3191083@google.com \
    --to=mka@chromium.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dianders@chromium.org \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sibis@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).