[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250130143424.52389-3-kkartik@nvidia.com>
Date: Thu, 30 Jan 2025 20:04:21 +0530
From: Kartik Rajput <kkartik@...dia.com>
To: <akhilrajeev@...dia.com>, <andi.shyti@...nel.org>, <robh@...nel.org>,
<krzk+dt@...nel.org>, <conor+dt@...nel.org>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <ldewangan@...dia.com>, <digetx@...il.com>,
<linux-i2c@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-tegra@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH v2 2/5] i2c: tegra: Do not configure DMA if not supported
On Tegra264, not all I2C controllers have the necessary interface to
GPC DMA, this causes failures when function tegra_i2c_init_dma()
is called.
Ensure that "dmas" device-tree property is present before initializing
DMA in function tegra_i2c_init_dma().
Signed-off-by: Kartik Rajput <kkartik@...dia.com>
---
v1 -> v2:
* Update commit message to clarify that some I2C controllers may
not have the necessary interface to GPC DMA.
---
drivers/i2c/busses/i2c-tegra.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
index 87976e99e6d0..b0dd129714a2 100644
--- a/drivers/i2c/busses/i2c-tegra.c
+++ b/drivers/i2c/busses/i2c-tegra.c
@@ -442,6 +442,9 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
if (IS_VI(i2c_dev))
return 0;
+ if (!device_property_present(i2c_dev->dev, "dmas"))
+ return 0;
+
if (i2c_dev->hw->has_apb_dma) {
if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
dev_dbg(i2c_dev->dev, "APB DMA support not enabled\n");
--
2.43.0
Powered by blists - more mailing lists