mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* regmap I3C support
@ 2024-11-11 19:07 Guenter Roeck
  2024-11-13 14:01 ` Mark Brown
  0 siblings, 1 reply; 17+ messages in thread
From: Guenter Roeck @ 2024-11-11 19:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Mark Brown, Frank Li

Hi all,

in general, regmap support for a specific interface type requires
a matching configuration option such as REGMAP_I2C or REGMAP_I3C.

For most interface types that works just fine. However, I3C is
kind of an exception since the same hardware and driver typically
supports both I2C and I3C.

The problem can be addressed by implementing three drivers - an I2C driver,
an I3C driver, and a common driver. This is done in the st_lsm6dsx IIO driver.

For simpler I2C / I3C devices, there is module_i3c_i2c_driver() which is
supposed to register both the I2C and the I3C drivers and handle the situation
where I3C is not enabled.

That works fine unless the driver uses regmap, but I3C and with it REGMAP_I3C
is not enabled. There is no dummy function for devm_regmap_init_i3c(), so
a probe function for an I2C/I3C driver utilizing regmap can not be built
unless REGMAP_I3C and with it I3C is enabled. Ultimately that means that
I2C/I3C drivers using regmap can not use module_i3c_i2c_driver() to register
the driver.

Am I missing something ? Otherwise, would it be possible to consider
a dummy devm_regmap_init_i3c() function if REGMAP_I3C=n ?

Thanks,
Guenter

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-11-19 22:22 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-11 19:07 regmap I3C support Guenter Roeck
2024-11-13 14:01 ` Mark Brown
2024-11-13 14:15   ` Guenter Roeck
2024-11-13 14:41     ` Mark Brown
2024-11-13 20:16       ` Guenter Roeck
2024-11-14 11:31         ` Mark Brown
2024-11-14 14:45           ` Guenter Roeck
2024-11-14 17:26             ` Mark Brown
2024-11-15  6:58               ` Guenter Roeck
2024-11-15 15:06                 ` Mark Brown
2024-11-15 15:46                   ` Guenter Roeck
2024-11-16  4:35               ` Guenter Roeck
2024-11-19 17:46                 ` Mark Brown
2024-11-19 18:41                   ` Guenter Roeck
2024-11-19 19:30                     ` Frank Li
2024-11-19 21:57                       ` Guenter Roeck
2024-11-19 22:22                         ` Frank Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®