Re: regmap I3C support
From: Mark Brown
Date: Thu Nov 14 2024 - 12:26:30 EST
On Thu, Nov 14, 2024 at 06:45:52AM -0800, Guenter Roeck wrote:
> We now use
> config SENSORS_TMP108
> tristate "Texas Instruments TMP108"
> depends on I2C
> depends on I3C || !I3C
> select REGMAP_I2C
> select REGMAP_I3C if I3C
> and in the i3c_probe function
> #ifdef CONFIG_REGMAP_I3C
> regmap = devm_regmap_init_i3c(i3cdev, &tmp108_regmap_config);
> #else
> regmap = ERR_PTR(-ENODEV);
> #endif
> if (IS_ERR(regmap))
> Clumsy, and not my preferred solution, but it works.
Right, so the fact that I3C depends on I2C deals with a lot of the
problems that plague the I2C/SPI combination. Ugh. I guess the helper
should be OK and there's not much doing for I2C/SPI.
Attachment:
signature.asc
Description: PGP signature