Commit 93d710a6 authored by Linus Walleij's avatar Linus Walleij Committed by Wolfram Sang

i2c: mux: fix up dependencies

We get the following build error from UM Linux after adding
an entry to drivers/iio/gyro/Kconfig that issues "select I2C_MUX":

ERROR: "devm_ioremap_resource"
   [drivers/i2c/muxes/i2c-mux-reg.ko] undefined!
ERROR: "of_address_to_resource"
   [drivers/i2c/muxes/i2c-mux-reg.ko] undefined!

It appears that the I2C mux core code depends on HAS_IOMEM
for historical reasons, while CONFIG_I2C_MUX_REG does *not*
have a direct dependency on HAS_IOMEM.

This creates a situation where a allyesconfig or allmodconfig
for UM Linux will select I2C_MUX, and will implicitly enable
I2C_MUX_REG as well, and the compilation will fail for the
register driver.

Fix this up by making I2C_MUX_REG depend on HAS_IOMEM and
removing the dependency from I2C_MUX.
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Reported-by: default avatarJonathan Cameron <jic23@jic23.retrosnub.co.uk>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Acked-by: default avatarPeter Rosin <peda@axentia.se>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
parent f10a59eb
...@@ -59,7 +59,6 @@ config I2C_CHARDEV ...@@ -59,7 +59,6 @@ config I2C_CHARDEV
config I2C_MUX config I2C_MUX
tristate "I2C bus multiplexing support" tristate "I2C bus multiplexing support"
depends on HAS_IOMEM
help help
Say Y here if you want the I2C core to support the ability to Say Y here if you want the I2C core to support the ability to
handle multiplexed I2C bus topologies, by presenting each handle multiplexed I2C bus topologies, by presenting each
......
...@@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL ...@@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL
config I2C_MUX_REG config I2C_MUX_REG
tristate "Register-based I2C multiplexer" tristate "Register-based I2C multiplexer"
depends on HAS_IOMEM
help help
If you say yes to this option, support will be included for a If you say yes to this option, support will be included for a
register based I2C multiplexer. This driver provides access to register based I2C multiplexer. This driver provides access to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment