Re: [PATCH v2 3/6] i2c: designware: Combine some of the common functions

From: Heikki Krogerus

Date: Mon Jan 19 2026 - 08:49:46 EST


Mon, Jan 19, 2026 at 03:44:22PM +0200, Andy Shevchenko kirjoitti:
> On Mon, Jan 19, 2026 at 03:18:34PM +0200, Heikki Krogerus wrote:
> > Tue, Dec 30, 2025 at 04:14:32PM +0200, Heikki Krogerus kirjoitti:
>
> ...
>
> > > > > - snprintf(adap->name, sizeof(adap->name),
> > > > > - "Synopsys DesignWare I2C Slave adapter");
> > > >
> > > > This patch changes the user visible strings (via `i2cdetect`) or module names
> > > > in case we want to find it by name (note, we already have such precedents for
> > > > other adapters). Currently we have three variants if I not miss anything:
> > > > Generic for master (as in this change), Generic for slave, and AMD platform
> > > > driver case. If you think this is okay change, then just drop the AMD case
> > > > as well, and hence remove the no more needed conditional. Otherwise I would
> > > > somehow group this naming in one place, if possible.
> > >
> > > The only thing that this will change is, it removes the common
> > > slave/target only description, because after this that setup is no
> > > longer possible - master mode is now always supported. So this is the
> > > correct thing to do.
> > >
> > > I don't think the user space should ever rely on a description like
> > > this except possibly with some customised/non-common systems that the
> > > user space really has to handle in some specific way, but if something
> > > really did rely on this common "target only" description, it could
> > > have only used it to determine that it basically can't use the device
> > > for anything as it's slave/target only - so basically to use it to
> > > check the functionality (same as i2cdetect -F). But as said, this is
> > > no longer a problem.
> > >
> > > As for the AMD case, if I understood what you are proposing, I
> > > disagree with you. The glue drivers should always be allowed to assign
> > > the name (these would be the "non-common" systems that the user space
> > > may actually need to know about). I'm also against grouping the
> > > naming. The glue drivers must handle the platform specifics including
> > > the naming if needed, not the core.
> >
> > Ping.
>
> Do you need my input on this? If you think this is good change, make sure the
> summary of the above goes to the commit message.

Got it.

Thanks Andy,

--
heikki