mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kartik Rajput <kkartik@nvidia.com>
To: Jon Hunter <jonathanh@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 v6 3/4] i2c: tegra: Add logic to support different register offsets
Date: Tue, 13 Jan 2026 22:10:14 +0530	[thread overview]
Message-ID: <91144915-1ca1-475f-9fc7-5eea18bdb39e@nvidia.com> (raw)
In-Reply-To: <2084e4ee-f984-4c39-95dc-1e2291a815e5@nvidia.com>

On 13/01/26 18:04, Jon Hunter wrote:
> 
> On 13/01/2026 09:04, 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
>> function are not required and they are removed:
>>   - tegra_i2c_reg_addr(): No translation required.
>>   - dvc_readl(): Replaced with i2c_readl().
>>
>> Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
>> ---
>> Changes in v6:
>>     * Do not remove dvc_writel().
>>     * Keep DVC registers defined as a macro.
>>     * Correct Tegra20 DVC register offsets.
>>     * Remove sl_cnfg, sl_addr1 and sl_addr2 registers for DVC and VI
>>       as they are not used.
>> Changes in v2:
>>     * Replace individual is_dvc and is_vi flags with an I2C variant.
>>     * Add tegra20_dvc_i2c_hw and tegra210_vi_i2c_hw in a separate
>>       patch.
>>     * Use calculated offsets for tegra20_dvc_i2c_regs and
>>       tegra210_vi_i2c_regs.
>>     * Initialize registers only if they are used on the given SoC.
>> ---
>>   drivers/i2c/busses/i2c-tegra.c | 368 +++++++++++++++++++++------------
>>   1 file changed, 239 insertions(+), 129 deletions(-)
> 
> ...
> 
>>   static const struct tegra_i2c_hw_feature tegra256_i2c_hw = {
>> @@ -1937,6 +2045,7 @@ static const struct tegra_i2c_hw_feature tegra256_i2c_hw = {
>>       .enable_hs_mode_support = true,
>>       .has_mutex = true,
>>       .variant = TEGRA_I2C_VARIANT_DEFAULT,
>> +    .regs = &tegra20_i2c_regs,
>>   };
> 
> 
> Is this correct? Tegra256 sets 'has_mutex' to true but is using the tegra20_i2c_regs which does not define the 'sw_mutex' register.
> 
> Jon
> 

Hi Jon,

Yes, this is incorrect, we should be using tegra264_i2c_regs here. I will fix this in the next patch set.

Thanks,
Kartik

  reply	other threads:[~2026-01-13 16:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-13  9:04 [PATCH v6 0/4] Add I2C support for Tegra410 Kartik Rajput
2026-01-13  9:04 ` [PATCH v6 1/4] i2c: tegra: Introduce tegra_i2c_variant to identify DVC and VI Kartik Rajput
2026-01-13  9:04 ` [PATCH v6 2/4] i2c: tegra: Move variant to tegra_i2c_hw_feature Kartik Rajput
2026-01-13  9:04 ` [PATCH v6 3/4] i2c: tegra: Add logic to support different register offsets Kartik Rajput
2026-01-13 12:34   ` Jon Hunter
2026-01-13 16:40     ` Kartik Rajput [this message]
2026-01-13  9:04 ` [PATCH v6 4/4] i2c: tegra: Add support for Tegra410 Kartik Rajput

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=91144915-1ca1-475f-9fc7-5eea18bdb39e@nvidia.com \
    --to=kkartik@nvidia.com \
    --cc=akhilrajeev@nvidia.com \
    --cc=andi.shyti@kernel.org \
    --cc=digetx@gmail.com \
    --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=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®