Hi, On Tue, 25 Jul 2023 at 03:47, Minda Chen <minda.c...@starfivetech.com> wrote: > > As the Designware_i2c_pci.c uses ACPI APIs, If some SoCs (StarFive > JH7110) contain Designware i2c and PCI but do not use ACPI, > This file will be can't be compiled. So add a new Kconfig for > designware_i2c_pci.c, which depends on ACPIGEN > > Signed-off-by: Minda Chen <minda.c...@starfivetech.com> > --- > drivers/i2c/Kconfig | 9 +++++++++ > drivers/i2c/Makefile | 4 +--- > 2 files changed, 10 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <s...@chromium.org> with nit below > > diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig > index 5e81698143..4c76fd7e41 100644 > --- a/drivers/i2c/Kconfig > +++ b/drivers/i2c/Kconfig > @@ -231,6 +231,15 @@ config SYS_I2C_DW > controller is used in various SoCs, e.g. the ST SPEAr, Altera > SoCFPGA, Synopsys ARC700 and some Intel x86 SoCs. > > +config SYS_I2C_DW_PCI > + bool "Designware PCI I2C Controller" > + depends on SYS_I2C_DW && PCI && ACPIGEN > + default y > + help > + Say yes here to select the Designware PCI I2C Host Controller. > + This PCI I2C controller is the base on Desigware I2C host spelling > + controller. > + > config SYS_I2C_AST2600 > bool "AST2600 I2C Controller" > depends on DM_I2C && ARCH_ASPEED > diff --git a/drivers/i2c/Makefile b/drivers/i2c/Makefile > index 99545df2e5..d5b85f398d 100644 > --- a/drivers/i2c/Makefile > +++ b/drivers/i2c/Makefile > @@ -18,9 +18,7 @@ obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o > obj-$(CONFIG_SYS_I2C_CA) += i2c-cortina.o > obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o > obj-$(CONFIG_SYS_I2C_DW) += designware_i2c.o > -ifdef CONFIG_PCI > -obj-$(CONFIG_SYS_I2C_DW) += designware_i2c_pci.o > -endif > +obj-$(CONFIG_SYS_I2C_DW_PCI) += designware_i2c_pci.o > obj-$(CONFIG_SYS_I2C_FSL) += fsl_i2c.o > obj-$(CONFIG_SYS_I2C_IHS) += ihs_i2c.o > obj-$(CONFIG_SYS_I2C_INTEL) += intel_i2c.o > -- > 2.17.1 > Regards, SImon