Re: [PATCH v5 2/5] dma-engine: sun4i: Add has_reset option to quirk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> wrote:

Hi,

From: Mesih Kilinc <mesihkilinc@xxxxxxxxx>

  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





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux