Re: [PATCH v9 2/4] i2c: tegra: Move variant to tegra_i2c_hw_feature

From: Andi Shyti

Date: Wed Jan 28 2026 - 17:18:26 EST


Hi Kartik,

> > > @@ -280,7 +282,6 @@ struct tegra_i2c_hw_feature {
> > > * @base_phys: physical base address of the I2C controller
> > > * @cont_id: I2C controller ID, used for packet header
> > > * @irq: IRQ number of transfer complete interrupt
> > > - * @variant: This represents the I2C controller variant.
> > > * @msg_complete: transfer completion notifier
> > > * @msg_buf_remaining: size of unsent data in the message buffer
> > > * @msg_len: length of message in current transfer
> > > @@ -332,13 +333,12 @@ struct tegra_i2c_dev {
> > > bool atomic_mode;
> > > bool dma_mode;
> > > bool msg_read;
> > > - enum tegra_i2c_variant variant;
> > > };
> > >
> > > #define IS_DVC(dev) (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && \
> > > - (dev)->variant == TEGRA_I2C_VARIANT_DVC)
> > > + (dev)->hw->variant == TEGRA_I2C_VARIANT_DVC)
> > > #define IS_VI(dev) (IS_ENABLED(CONFIG_ARCH_TEGRA_210_SOC) && \
> > > - (dev)->variant == TEGRA_I2C_VARIANT_VI)
> > > + (dev)->hw->variant == TEGRA_I2C_VARIANT_VI)
> > >
> > > static void dvc_writel(struct tegra_i2c_dev *i2c_dev, u32 val,
> > > unsigned int reg)
> > > @@ -1647,8 +1647,42 @@ static const struct tegra_i2c_hw_feature tegra20_i2c_hw = {
> > > .has_interface_timing_reg = false,
> > > .enable_hs_mode_support = false,
> > > .has_mutex = false,
> > > + .variant = TEGRA_I2C_VARIANT_DEFAULT,
> > > };
> >
> > in v8 I made a question at this point, could you please answer?

...

> Are you referring to the following question on v7 of this series, which I've already addressed?
> https://lore.kernel.org/linux-tegra/c3cdece5-1bf6-46eb-a668-2ee2a4358a88@xxxxxxxxxx/#t

I'm sorry, what have you addressed. It doesn't look addressed to
me. In the same series, I want to avoid adding something in one
patch and removing it in the next. It just adds noise.

Andi