hw/i2c/Kconfig: Add an entry for the SMBus
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 31 Dec 2019 18:32:07 +0000 (19:32 +0100)
committerCorey Minyard <cminyard@mvista.com>
Thu, 16 Jul 2020 17:30:54 +0000 (12:30 -0500)
The System Management Bus is more or less a derivative of the I2C
bus, thus the Kconfig entry depends of I2C.
Not all boards providing an I2C bus support SMBus.
Use two different Kconfig entries to be able to select I2C without
selecting SMBus.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191231183216.6781-6-philmd@redhat.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
hw/i2c/Kconfig
hw/i2c/Makefile.objs

index 2bbd395813c8810efaf6c59d1dcb0199693fe61e..09642a6dcb726ba68b605998bc0e7e9e21aadaf7 100644 (file)
@@ -1,9 +1,13 @@
 config I2C
     bool
 
+config SMBUS
+    bool
+    select I2C
+
 config SMBUS_EEPROM
     bool
-    depends on I2C
+    select SMBUS
 
 config VERSATILE_I2C
     bool
@@ -11,7 +15,7 @@ config VERSATILE_I2C
 
 config ACPI_SMBUS
     bool
-    select I2C
+    select SMBUS
 
 config BITBANG_I2C
     bool
index 6ba976b257f7f2e0a40888f785d00c0ead1851b9..f2c61eaa8b3ead97f22a695ef9fafc41d50cae6a 100644 (file)
@@ -1,4 +1,5 @@
-common-obj-$(CONFIG_I2C) += core.o smbus_slave.o smbus_master.o
+common-obj-$(CONFIG_I2C) += core.o
+common-obj-$(CONFIG_SMBUS) += smbus_slave.o smbus_master.o
 common-obj-$(CONFIG_SMBUS_EEPROM) += smbus_eeprom.o
 common-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o
 common-obj-$(CONFIG_ACPI_X86_ICH) += smbus_ich9.o