mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Andi Shyti <andi.shyti@kernel.org>
Cc: Marijn Suijten <marijn.suijten@somainline.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-spi@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, linux-i2c@vger.kernel.org
Subject: Re: [PATCH 4/5] soc: qcom: geni-se: Allow any combination of icc paths
Date: Mon, 3 Jul 2023 17:31:38 +0300	[thread overview]
Message-ID: <29f6e66d-d093-8d65-bf88-046dca5f0dcf@linaro.org> (raw)
In-Reply-To: <20230703-topic-8250_qup_icc-v1-4-fea39aa07525@linaro.org>

On 03/07/2023 16:31, Konrad Dybcio wrote:
> Not all SoCs provide all the usual paths. By the looks of it, at least
> SM8150 and SM8250 don't have one that would resemble "qup-core".
> 
> Check for the error that icc_get throws and assign a NULL value to each
> path that can't be found to effectively allow any combination of icc paths
> (which, like previously, includes no icc paths). The ICC APIs gracefully
> handle a NULL path by exiting early.
> 
> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
> ---
>   drivers/soc/qcom/qcom-geni-se.c | 9 +++++++--
>   1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c
> index ba788762835f..a5e2e8925c8e 100644
> --- a/drivers/soc/qcom/qcom-geni-se.c
> +++ b/drivers/soc/qcom/qcom-geni-se.c
> @@ -813,8 +813,13 @@ int geni_icc_get(struct geni_se *se, const char *icc_ddr)
>   			continue;
>   
>   		se->icc_paths[i].path = devm_of_icc_get(se->dev, icc_names[i]);

Would it make sense to add (devm_)of_icc_get_optional instead?  I think 
we already have several usecases for such API call

For this patch:

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

> -		if (IS_ERR(se->icc_paths[i].path))
> -			goto err;
> +		if (IS_ERR(se->icc_paths[i].path)) {
> +			/* Not all SoCs implement all the paths */
> +			if (PTR_ERR(se->icc_paths[i].path) == -ENODATA)
> +				se->icc_paths[i].path = NULL;
> +			else
> +				goto err;
> +		}
>   	}
>   
>   	return 0;
> 

-- 
With best wishes
Dmitry


  reply	other threads:[~2023-07-03 14:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 13:31 [PATCH 0/5] Add interconnects to QUPs on SM8250 Konrad Dybcio
2023-07-03 13:31 ` [PATCH 1/5] dt-bindings: spi: spi-geni-qcom: Allow no qup-core icc path Konrad Dybcio
2023-07-03 13:59   ` Krzysztof Kozlowski
2023-07-03 13:31 ` [PATCH 2/5] dt-bindings: serial: geni-qcom: " Konrad Dybcio
2023-07-03 14:01   ` Krzysztof Kozlowski
2023-07-03 14:38     ` Konrad Dybcio
2023-07-03 14:41       ` Krzysztof Kozlowski
2023-07-03 14:50   ` Rob Herring
2023-07-03 13:31 ` [PATCH 3/5] dt-bindings: i2c: qcom,i2c-geni: " Konrad Dybcio
2023-07-03 14:36   ` Krzysztof Kozlowski
2023-07-03 14:59     ` Krzysztof Kozlowski
2023-07-03 14:50   ` Rob Herring
2023-07-03 13:31 ` [PATCH 4/5] soc: qcom: geni-se: Allow any combination of icc paths Konrad Dybcio
2023-07-03 14:31   ` Dmitry Baryshkov [this message]
2023-07-03 13:31 ` [PATCH 5/5] arm64: dts: qcom: sm8250: Add interconnects and power-domains to QUPs Konrad Dybcio
2023-07-03 14:25   ` Dmitry Baryshkov
2023-07-03 14:58 ` [PATCH 0/5] Add interconnects to QUPs on SM8250 Bjorn Andersson

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=29f6e66d-d093-8d65-bf88-046dca5f0dcf@linaro.org \
    --to=dmitry.baryshkov@linaro.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andi.shyti@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marijn.suijten@somainline.org \
    --cc=robh+dt@kernel.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

all inboxes | Powered by JetHome®