mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Kartik Rajput <kkartik@nvidia.com>,
	ldewangan@nvidia.com, digetx@gmail.com, andi.shyti@kernel.org,
	thierry.reding@gmail.com, akhilrajeev@nvidia.com,
	smangipudi@nvidia.com, linux-i2c@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v8 3/4] i2c: tegra: Add logic to support different register offsets
Date: Wed, 21 Jan 2026 14:30:08 +0000	[thread overview]
Message-ID: <b91fa3a8-3fcd-4c74-826a-9679421f5fb6@nvidia.com> (raw)
In-Reply-To: <20260120092032.83100-4-kkartik@nvidia.com>



On 20/01/2026 09:20, Kartik Rajput wrote:
> Tegra410 use different offsets for existing I2C registers, update
> the logic to use appropriate offsets per SoC.
> 
> As the registers offsets are now also defined for dvc and vi, following

So this is still not accurate because the DVC offsets definition have 
not changed.

> -static void dvc_writel(struct tegra_i2c_dev *i2c_dev, u32 val,
> -		       unsigned int reg)
> -{
> -	writel_relaxed(val, i2c_dev->base + reg);
> -}
> -
> -static u32 dvc_readl(struct tegra_i2c_dev *i2c_dev, unsigned int reg)
> -{
> -	return readl_relaxed(i2c_dev->base + reg);
> -}

...

> @@ -619,14 +712,14 @@ static void tegra_dvc_init(struct tegra_i2c_dev *i2c_dev)
>   {
>   	u32 val;
>   
> -	val = dvc_readl(i2c_dev, DVC_CTRL_REG3);
> +	val = i2c_readl(i2c_dev, DVC_CTRL_REG3);
>   	val |= DVC_CTRL_REG3_SW_PROG;
>   	val |= DVC_CTRL_REG3_I2C_DONE_INTR_EN;
> -	dvc_writel(i2c_dev, val, DVC_CTRL_REG3);
> +	writel_relaxed(val, i2c_dev->base + DVC_CTRL_REG3);
>   
> -	val = dvc_readl(i2c_dev, DVC_CTRL_REG1);
> +	val = i2c_readl(i2c_dev, DVC_CTRL_REG1);
>   	val |= DVC_CTRL_REG1_INTR_EN;
> -	dvc_writel(i2c_dev, val, DVC_CTRL_REG1);
> +	writel_relaxed(val, i2c_dev->base + DVC_CTRL_REG1);
>   }

Looking at the above, I think I would be tempted to leave this as-is and 
not make any changes here to reduce the diff.

Jon

-- 
nvpublic


  reply	other threads:[~2026-01-21 14:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-20  9:20 [PATCH v8 0/4] Add I2C support for Tegra410 Kartik Rajput
2026-01-20  9:20 ` [PATCH v8 1/4] i2c: tegra: Introduce tegra_i2c_variant to identify DVC and VI Kartik Rajput
2026-01-20  9:20 ` [PATCH v8 2/4] i2c: tegra: Move variant to tegra_i2c_hw_feature Kartik Rajput
2026-01-20  9:20 ` [PATCH v8 3/4] i2c: tegra: Add logic to support different register offsets Kartik Rajput
2026-01-21 14:30   ` Jon Hunter [this message]
2026-01-21 15:36     ` Kartik Rajput
2026-01-20  9:20 ` [PATCH v8 4/4] i2c: tegra: Add support for Tegra410 Kartik Rajput
2026-01-21 14:31 ` [PATCH v8 0/4] Add I2C " Jon Hunter

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=b91fa3a8-3fcd-4c74-826a-9679421f5fb6@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=andi.shyti@kernel.org \
    --cc=digetx@gmail.com \
    --cc=kkartik@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=smangipudi@nvidia.com \
    --cc=thierry.reding@gmail.com \
    /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

all inboxes | Powered by JetHome®