From: Jon Hunter <jonathanh@nvidia.com>
To: Kartik Rajput <kkartik@nvidia.com>,
akhilrajeev@nvidia.com, andi.shyti@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
thierry.reding@gmail.com, ldewangan@nvidia.com, digetx@gmail.com,
smangipudi@nvidia.com, linux-i2c@vger.kernel.org,
devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] i2c: tegra: Add logic to support different register offsets
Date: Thu, 6 Nov 2025 07:59:46 +0000 [thread overview]
Message-ID: <4b121269-1efe-4741-b67f-42346b6c5c88@nvidia.com> (raw)
In-Reply-To: <20251001153648.667036-2-kkartik@nvidia.com>
On 01/10/2025 16:36, Kartik Rajput wrote:
> Tegra410 use different offsets for existing I2C registers, update
> the logic to use appropriate offsets per SoC.
>
> Signed-off-by: Kartik Rajput <kkartik@nvidia.com>
> ---
> drivers/i2c/busses/i2c-tegra.c | 499 ++++++++++++++++++++++-----------
> 1 file changed, 334 insertions(+), 165 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c
> index 038809264526..1e26d67cbd30 100644
> --- a/drivers/i2c/busses/i2c-tegra.c
> +++ b/drivers/i2c/busses/i2c-tegra.c
...
> /*
> * msg_end_type: The bus control which needs to be sent at end of transfer.
> * @MSG_END_STOP: Send stop pulse.
> @@ -219,6 +322,9 @@ enum msg_end_type {
> * timing settings.
> * @has_hs_mode_support: Has support for high speed (HS) mode transfers.
> * @has_mutex: Has mutex register for mutual exclusion with other firmwares or VMs.
> + * @is_dvc: This instance represents the DVC I2C controller variant.
> + * @is_vi: This instance represents the VI I2C controller variant.
> + * @regs: Register offsets for the specific SoC variant.
> */
> struct tegra_i2c_hw_feature {
> bool has_continue_xfer_support;
> @@ -247,6 +353,9 @@ struct tegra_i2c_hw_feature {
> bool has_interface_timing_reg;
> bool has_hs_mode_support;
> bool has_mutex;
> + bool is_dvc;
> + bool is_vi;
> + const struct tegra_i2c_regs *regs;
> };
I think it could be better to have a 'variant' flag for these is_dvc and
is_vi variables because they are mutually exclusive.
Jon
--
nvpublic
next prev parent reply other threads:[~2025-11-06 7:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-01 15:36 [PATCH 0/2] Add I2C support for Tegra410 Kartik Rajput
2025-10-01 15:36 ` [PATCH 1/2] i2c: tegra: Add logic to support different register offsets Kartik Rajput
2025-10-24 15:11 ` Jon Hunter
2025-10-24 15:13 ` Jon Hunter
2025-10-28 5:47 ` Kartik Rajput
2025-10-24 15:33 ` Jon Hunter
2025-10-28 5:42 ` Kartik Rajput
2025-11-06 7:59 ` Jon Hunter [this message]
2025-11-06 8:06 ` Kartik Rajput
2025-10-01 15:36 ` [PATCH 2/2] i2c: tegra: Add support for Tegra410 Kartik Rajput
2025-10-24 15:17 ` Jon Hunter
2025-10-28 5:44 ` 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=4b121269-1efe-4741-b67f-42346b6c5c88@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=akhilrajeev@nvidia.com \
--cc=andi.shyti@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=digetx@gmail.com \
--cc=kkartik@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=ldewangan@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@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