[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <656fab96-b326-4721-9b55-2b5e3d652703@prolan.hu>
Date: Mon, 4 Nov 2024 08:41:56 +0100
From: Csókás Bence <csokas.bence@...lan.hu>
To: Andre Przywara <andre.przywara@....com>
CC: <dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<linux-sunxi@...ts.linux.dev>, <linux-kernel@...r.kernel.org>, Mesih Kilinc
<mesihkilinc@...il.com>, Krzysztof Kozlowski <krzk@...nel.org>, Vinod Koul
<vkoul@...nel.org>, Chen-Yu Tsai <wens@...e.org>, Jernej Skrabec
<jernej.skrabec@...il.com>, Samuel Holland <samuel@...lland.org>, "Philipp
Zabel" <p.zabel@...gutronix.de>
Subject: Re: [PATCH v5 2/5] dma-engine: sun4i: Add has_reset option to quirk
Hi!
On 2024. 11. 02. 18:45, Andre Przywara wrote:
> On Sat, 2 Nov 2024 10:31:41 +0100
> "Csókás, Bence" <csokas.bence@...lan.hu> wrote:
>
> Hi,
>
>> From: Mesih Kilinc <mesihkilinc@...il.com>
>>
>> static struct sun4i_dma_dev *to_sun4i_dma_dev(struct dma_device *dev)
>> @@ -1215,6 +1218,13 @@ static int sun4i_dma_probe(struct platform_device *pdev)
>> return PTR_ERR(priv->clk);
>> }
>>
>> + if (priv->cfg->has_reset) {
>> + priv->rst = devm_reset_control_get_exclusive(&pdev->dev, NULL);
>
> Can't we use devm_reset_control_get_optional_exclusive(), and then save
> this whole has_reset bit?
For suniv, reset is REQUIRED. For sun4i, reset DOES NOT EXIST.
has_reset does not mean that whether this instance has a reset control
or not, that is handled by checking priv->rst for NULL. has_reset means
whether reset is REQUIRED by this type of DMA, specified by the DT match
data.
Bence
Powered by blists - more mailing lists