Re: [PATCH v8 2/6] i2c: i801: Use a different adapter-name for IDF adapters

Andy Shevchenko
2024-08-14T18:43:51Z

On Wed, Aug 14, 2024 at 08:35:09PM +0200, Wolfram Sang wrote:
> Hi Andi, Hans, all,
>
> > > + /*
> > > + * adapter.name is used by platform code to find the main I801 adapter
> > > + * to instantiante i2c_clients, do not change.
> > > + */
> > > snprintf(priv->adapter.name, sizeof(priv->adapter.name),
> > > - "SMBus I801 adapter at %04lx", priv->smba);
> > > + "SMBus %s adapter at %04lx",
> > > + (priv->features & FEATURE_IDF) ? "I801 IDF" : "I801",
> > > + priv->smba);
> > > +
> >
> > do you have any comment here?
>
> I have been scratching my head about this patch for a while. I still
> think that it is quite fragile to base features on this naming. The
> comment above helps, but I still have a bad feeling about it.
>
> I noticed now that the i801 driver does not use the algo_data field so
> far. Has it been considered to put a flag there?

Hmm... algo_data by the naming seems has to be related to the algorithm,
but AFAIU here we have simply more than one _identical_ adapters. How
is this semantically related?

--
With Best Regards,
Andy Shevchenko