Check if I2C core has been built as a module when BATTERY_BQ27XXX
is built-in. If so disable I2C functionality.

Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in 
Reported-by: Arnd Bergmann <>
Signed-off-by: Andrew F. Davis <>
 drivers/power/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 237d7aa..2f944d7 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -166,6 +166,7 @@ config BATTERY_BQ27XXX_I2C
        bool "BQ27xxx I2C support"
        depends on BATTERY_BQ27XXX
        depends on I2C
+       depends on !(I2C=m && BATTERY_BQ27XXX=y)
        default y
          Say Y here to enable support for batteries with BQ27xxx (I2C) chips.

To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to
More majordomo info at

Reply via email to