From: Nicolas Ferre <nicolas.ferre@microchip.com>
To: Liao Yuanhong <liaoyuanhong@vivo.com>, <vkoul@kernel.org>
Cc: <dmaengine@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <imx@lists.linux.dev>
Subject: Re: [PATCH v2 2/7] dmaengine:at_hdmac:Use devm_clk_get_enabled() helpers
Date: Fri, 30 Aug 2024 14:24:18 +0200 [thread overview]
Message-ID: <8ddf8cc7-0611-4c04-b814-be13ae14dedf@microchip.com> (raw)
In-Reply-To: <20240830094118.15458-3-liaoyuanhong@vivo.com>
On 30/08/2024 at 11:41, Liao Yuanhong wrote:
> Use devm_clk_get_enabled() instead of clk functions in at_hdmac.
I don't see how it could work: so please disregard at_hdmac when playing
with "simplification". No subsequent version of this thing please.
NACK (again).
Best regards,
Nicolas
> Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
> ---
> v2:remove modifications related to the resume operation.
> ---
> drivers/dma/at_hdmac.c | 16 ++--------------
> 1 file changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 40052d1bd0b5..2274aeb58271 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1975,20 +1975,16 @@ static int __init at_dma_probe(struct platform_device *pdev)
> atdma->dma_device.cap_mask = plat_dat->cap_mask;
> atdma->all_chan_mask = (1 << plat_dat->nr_channels) - 1;
>
> - atdma->clk = devm_clk_get(&pdev->dev, "dma_clk");
> + atdma->clk = devm_clk_get_enabled(&pdev->dev, "dma_clk");
> if (IS_ERR(atdma->clk))
> return PTR_ERR(atdma->clk);
>
> - err = clk_prepare_enable(atdma->clk);
> - if (err)
> - return err;
> -
> /* force dma off, just in case */
> at_dma_off(atdma);
>
> err = request_irq(irq, at_dma_interrupt, 0, "at_hdmac", atdma);
> if (err)
> - goto err_irq;
> + return err;
>
> platform_set_drvdata(pdev, atdma);
>
> @@ -2105,8 +2101,6 @@ static int __init at_dma_probe(struct platform_device *pdev)
> dma_pool_destroy(atdma->lli_pool);
> err_desc_pool_create:
> free_irq(platform_get_irq(pdev, 0), atdma);
> -err_irq:
> - clk_disable_unprepare(atdma->clk);
> return err;
> }
>
> @@ -2130,16 +2124,11 @@ static void at_dma_remove(struct platform_device *pdev)
> atc_disable_chan_irq(atdma, chan->chan_id);
> list_del(&chan->device_node);
> }
> -
> - clk_disable_unprepare(atdma->clk);
> }
>
> static void at_dma_shutdown(struct platform_device *pdev)
> {
> - struct at_dma *atdma = platform_get_drvdata(pdev);
> -
> at_dma_off(platform_get_drvdata(pdev));
> - clk_disable_unprepare(atdma->clk);
> }
>
> static int at_dma_prepare(struct device *dev)
> @@ -2194,7 +2183,6 @@ static int at_dma_suspend_noirq(struct device *dev)
>
> /* disable DMA controller */
> at_dma_off(atdma);
> - clk_disable_unprepare(atdma->clk);
> return 0;
> }
>
> --
> 2.25.1
>
>
next prev parent reply other threads:[~2024-08-30 12:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 9:41 [PATCH v2 0/7] dmaengine:Use devm_clk_get_enabled() helpers Liao Yuanhong
2024-08-30 9:41 ` [PATCH v2 1/7] dmaengine:Add COMPILE_TEST for easy testing Liao Yuanhong
2024-08-30 17:44 ` Krzysztof Kozlowski
2024-08-31 13:15 ` kernel test robot
2024-08-31 21:31 ` kernel test robot
2024-08-30 9:41 ` [PATCH v2 2/7] dmaengine:at_hdmac:Use devm_clk_get_enabled() helpers Liao Yuanhong
2024-08-30 12:24 ` Nicolas Ferre [this message]
2024-08-30 9:41 ` [PATCH v2 3/7] dmaengine:dma-jz4780:Use " Liao Yuanhong
2024-08-30 9:41 ` [PATCH v2 4/7] dmaengine:imx-dma:Use " Liao Yuanhong
2024-08-30 15:12 ` Frank Li
2024-08-30 9:41 ` [PATCH v2 5/7] dmaengine:imx-sdma:Use devm_clk_get_prepared() helpers Liao Yuanhong
2024-08-30 15:11 ` Frank Li
2024-08-30 9:41 ` [PATCH v2 6/7] dmaengine:milbeaut-hdmac:Use devm_clk_get_enabled() helpers Liao Yuanhong
2024-08-30 9:41 ` [PATCH v2 7/7] dmaengine:uniphier-mdmac:Use " Liao Yuanhong
2024-08-30 18:11 ` [PATCH v2 0/7] dmaengine:Use " Krzysztof Kozlowski
2024-09-03 5:18 ` 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=8ddf8cc7-0611-4c04-b814-be13ae14dedf@microchip.com \
--to=nicolas.ferre@microchip.com \
--cc=dmaengine@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=liaoyuanhong@vivo.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@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