dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang7@gmail.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	dmaengine@vger.kernel.org,
	Devicetree List <devicetree@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] dmaengine: sprd: deprecate '#dma-channels'
Date: Wed, 4 May 2022 10:28:05 +0800	[thread overview]
Message-ID: <CADBw62pJfLH4ZfgXKoce_OwUrFKJL_e1aVVmJWK8TGaJhmA=4w@mail.gmail.com> (raw)
In-Reply-To: <20220503065147.51728-3-krzysztof.kozlowski@linaro.org>

On Tue, May 3, 2022 at 2:51 PM Krzysztof Kozlowski
<krzysztof.kozlowski@linaro.org> wrote:
>
> The generic property, used in most of the drivers and defined in generic
> dma-common DT bindings, is 'dma-channels'.  Switch to new property while
> keeping backward compatibility.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Thanks.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>

> ---
>  drivers/dma/sprd-dma.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 7f158ef5672d..2138b80435ab 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1117,7 +1117,11 @@ static int sprd_dma_probe(struct platform_device *pdev)
>         u32 chn_count;
>         int ret, i;
>
> -       ret = device_property_read_u32(&pdev->dev, "#dma-channels", &chn_count);
> +       /* Parse new and deprecated dma-channels properties */
> +       ret = device_property_read_u32(&pdev->dev, "dma-channels", &chn_count);
> +       if (ret)
> +               ret = device_property_read_u32(&pdev->dev, "#dma-channels",
> +                                              &chn_count);
>         if (ret) {
>                 dev_err(&pdev->dev, "get dma channels count failed\n");
>                 return ret;
> --
> 2.32.0
>


-- 
Baolin Wang

  reply	other threads:[~2022-05-04  2:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-03  6:51 [PATCH v2 0/3] dmaengine/ARM: sprd: use proper 'dma-channels/requests' properties Krzysztof Kozlowski
2022-05-03  6:51 ` [PATCH v2 1/3] dt-bindings: dmaengine: sprd: deprecate '#dma-channels' Krzysztof Kozlowski
2022-05-03  6:51 ` [PATCH v2 2/3] " Krzysztof Kozlowski
2022-05-04  2:28   ` Baolin Wang [this message]
2022-05-03  6:51 ` [PATCH v2 3/3] arm64: dts: sprd: use new 'dma-channels' property Krzysztof Kozlowski
2022-05-04  2:29   ` Baolin Wang
2022-05-16 13:05 ` [PATCH v2 0/3] dmaengine/ARM: sprd: use proper 'dma-channels/requests' properties Vinod Koul

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='CADBw62pJfLH4ZfgXKoce_OwUrFKJL_e1aVVmJWK8TGaJhmA=4w@mail.gmail.com' \
    --to=baolin.wang7@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=zhang.lyra@gmail.com \
    /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).