From: Dmitry Osipenko <digetx@gmail.com>
To: Akhil R <akhilrajeev@nvidia.com>,
christian.koenig@amd.com, devicetree@vger.kernel.org,
jonathanh@nvidia.com, ldewangan@nvidia.com,
linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-tegra@vger.kernel.org, robh+dt@kernel.org,
sumit.semwal@linaro.org, thierry.reding@gmail.com,
wsa@kernel.org
Subject: Re: [PATCH v2 1/3] i2c: tegra: Add GPCDMA support
Date: Sat, 10 Sep 2022 12:03:19 +0300 [thread overview]
Message-ID: <3a6057c6-0f9d-66ea-d15d-33a6c7f1a8c7@gmail.com> (raw)
In-Reply-To: <20220906144716.16274-2-akhilrajeev@nvidia.com>
06.09.2022 17:47, Akhil R пишет:
> Enable support for GPCDMA, which is used in I2C controllers
> in Tegra 186 and above. The chips before that used APB DMA.
> This change works under the presumption that all chips apart from
> those supporting APB DMA is using GPCDMA.
>
> Signed-off-by: Akhil R <akhilrajeev@nvidia.com>
> ---
> drivers/i2c/busses/i2c-tegra.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 031c78ac42e6..954022c04cc4 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
> @@ -443,11 +443,16 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
> u32 *dma_buf;
> int err;
>
> - if (!i2c_dev->hw->has_apb_dma || i2c_dev->is_vi)
> + if (i2c_dev->is_vi)
> return 0;
>
> - if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
> - dev_dbg(i2c_dev->dev, "DMA support not enabled\n");
> + 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");
> + return 0;
> + }
> + } else if (!IS_ENABLED(CONFIG_TEGRA186_GPC_DMA)) {
> + dev_dbg(i2c_dev->dev, "GPC DMA support not enabled\n");
> return 0;
> }
>
To me the symmetrical if-else will look a bit better, but that's a too
minor nit.
if () {
if ()
} else {
if ()
}
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
next prev parent reply other threads:[~2022-09-10 9:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-06 14:47 [PATCH v2 0/3] Add GPCDMA support to Tegra I2C Akhil R
2022-09-06 14:47 ` [PATCH v2 1/3] i2c: tegra: Add GPCDMA support Akhil R
2022-09-10 9:03 ` Dmitry Osipenko [this message]
2022-09-16 19:47 ` Wolfram Sang
2022-09-06 14:47 ` [PATCH v2 2/3] arm64: tegra: Add GPCDMA support for Tegra I2C Akhil R
2022-10-07 13:20 ` Thierry Reding
2022-10-07 14:34 ` Thierry Reding
2022-10-07 14:53 ` Robin Murphy
2022-10-07 15:17 ` Thierry Reding
2022-10-07 17:40 ` Robin Murphy
2022-09-06 14:47 ` [PATCH v2 3/3] arm64: defconfig: Make TEGRA186_GPC_DMA built-in Akhil R
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=3a6057c6-0f9d-66ea-d15d-33a6c7f1a8c7@gmail.com \
--to=digetx@gmail.com \
--cc=akhilrajeev@nvidia.com \
--cc=christian.koenig@amd.com \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=ldewangan@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=thierry.reding@gmail.com \
--cc=wsa@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;
as well as URLs for NNTP newsgroup(s).