mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
All combined i2c/i3c drivers appear to suffer from the same link time problem when CONFIG_I3C is set to 'm': arm-linux-gnueabi-ld: drivers/iio/magnetometer/mmc5633.o: in function `mmc5633_i3c_driver_init': mmc5633.c:(.init.text+0x30): undefined reference to `i3c_driver_register_with_owner' This was previously fixed every time by marking individual drivers as 'depends on I2C; depends on I3C || !I3C', but this gets tedious and is somewhat confusing. Add a Kconfig symbol 'I3C_OR_I2C' to help replace those dependencies, and use this in all the existing drivers that had already fixed it as well as the new mmc5633 driver. Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com> Link: https://patch.msgid.link/20260204164216.544409-1-arnd@kernel.org Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
37 lines
1019 B
Plaintext
37 lines
1019 B
Plaintext
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
menuconfig I3C
|
|
tristate "I3C support"
|
|
select I2C
|
|
help
|
|
I3C is a serial protocol standardized by the MIPI alliance.
|
|
|
|
It's supposed to be backward compatible with I2C while providing
|
|
support for high speed transfers and native interrupt support
|
|
without the need for extra pins.
|
|
|
|
The I3C protocol also standardizes the slave device types and is
|
|
mainly designed to communicate with sensors.
|
|
|
|
If you want I3C support, you should say Y here and also to the
|
|
specific driver for your bus adapter(s) below.
|
|
|
|
This I3C support can also be built as a module. If so, the module
|
|
will be called i3c.
|
|
|
|
if I3C
|
|
source "drivers/i3c/master/Kconfig"
|
|
endif # I3C
|
|
|
|
config I3C_OR_I2C
|
|
tristate
|
|
default m if I3C=m
|
|
default I2C
|
|
help
|
|
Device drivers using module_i3c_i2c_driver() can use either
|
|
i2c or i3c hosts, but cannot be built-in for the kernel when
|
|
CONFIG_I3C=m.
|
|
|
|
Add 'depends on I2C_OR_I3C' in Kconfig for those drivers to
|
|
get the correct dependencies.
|