Re: regmap I3C support

From: Guenter Roeck
Date: Wed Nov 13 2024 - 15:16:51 EST


On 11/13/24 06:41, Mark Brown wrote:
On Wed, Nov 13, 2024 at 06:15:38AM -0800, Guenter Roeck wrote:
On 11/13/24 06:01, Mark Brown wrote:

Don't these drivers end up with the same miserable problems with
dependencies on variations of things being configured built in and
modules anyway that mean we build separate SPI and I2C bus wrappers for
the same case with devices that do both I2C and SPI?

Not really. There is no equivalent to module_i3c_i2c_driver() to handle both
I2C and SPI variants of a chip. Also, SPI and I2C/I3C are not interdependent,

Sure, but lots of drivers were open coding an equivalent of that
(possibly some still do).

while I3C automatically selects I2C. That means it does make sense to handle
I2C and I3C in the same driver, but not I2C and SPI.

In terms of the devices they're very much the same and interdependent -
it's generally one IP block and one set of pins that's doing both I2C
and SPI, with nothing software visible different. If I3C selects I2C
then that does eliminate some of the problem space, I can't remember the
speciifcs of how people (I think mainly randconfig people?) were
breaking things. You at least have I2C=y I3C=m which means that
dependencies have to force the users modular.

Sure, separate wrappers can be used, but that makes module_i3c_i2c_driver()
pointless.

That's kind of my question. If we are going to have this sort of stuff
we should also have it for I2C and SPI since it's such a common pattern.

I'll take that as "we are not going to provide a dummy regmap i3c registration
function". Thanks, that is all I needed to know.

Guenter