linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] i2c: mux: fix up dependencies
@ 2016-11-14 14:34 Linus Walleij
  2016-11-14 14:39 ` Peter Rosin
  2016-11-14 17:24 ` Wolfram Sang
  0 siblings, 2 replies; 4+ messages in thread
From: Linus Walleij @ 2016-11-14 14:34 UTC (permalink / raw)
  To: Wolfram Sang, linux-i2c
  Cc: Linus Walleij, stable, Jonathan Cameron, Peter Rosin

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.

Cc: stable@vger.kernel.org
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reported-by: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
Cc: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
Cc: Peter Rosin <peda@axentia.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ChangeLog v1->v2:
- Drop the assumed dependency on OF from I2C_MUX
---
 drivers/i2c/Kconfig       | 1 -
 drivers/i2c/muxes/Kconfig | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index d223650a97e4..11edabf425ae 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -59,7 +59,6 @@ config I2C_CHARDEV
 
 config I2C_MUX
 	tristate "I2C bus multiplexing support"
-	depends on HAS_IOMEM
 	help
 	  Say Y here if you want the I2C core to support the ability to
 	  handle multiplexed I2C bus topologies, by presenting each
diff --git a/drivers/i2c/muxes/Kconfig b/drivers/i2c/muxes/Kconfig
index e280c8ecc0b5..96de9ce5669b 100644
--- a/drivers/i2c/muxes/Kconfig
+++ b/drivers/i2c/muxes/Kconfig
@@ -63,6 +63,7 @@ config I2C_MUX_PINCTRL
 
 config I2C_MUX_REG
 	tristate "Register-based I2C multiplexer"
+	depends on HAS_IOMEM
 	help
 	  If you say yes to this option, support will be included for a
 	  register based I2C multiplexer. This driver provides access to
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] i2c: mux: fix up dependencies
  2016-11-14 14:34 [PATCH v2] i2c: mux: fix up dependencies Linus Walleij
@ 2016-11-14 14:39 ` Peter Rosin
  2016-11-14 17:13   ` Jonathan Cameron
  2016-11-14 17:24 ` Wolfram Sang
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Rosin @ 2016-11-14 14:39 UTC (permalink / raw)
  To: Linus Walleij, Wolfram Sang, linux-i2c; +Cc: stable, Jonathan Cameron

On 2016-11-14 15:34, Linus Walleij wrote:
> 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.
> 
> Cc: stable@vger.kernel.org
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Reported-by: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
> Cc: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
> Cc: Peter Rosin <peda@axentia.se>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Acked-by: Peter Rosin <peda@axentia.se>

Thanks!

Cheers,
Peter

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] i2c: mux: fix up dependencies
  2016-11-14 14:39 ` Peter Rosin
@ 2016-11-14 17:13   ` Jonathan Cameron
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2016-11-14 17:13 UTC (permalink / raw)
  To: Peter Rosin, Linus Walleij, Wolfram Sang, linux-i2c; +Cc: stable



On 14 November 2016 14:39:54 GMT+00:00, Peter Rosin <peda@axentia.se> wrote:
>On 2016-11-14 15:34, Linus Walleij wrote:
>> 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.
>> 
>> Cc: stable@vger.kernel.org
>> Reported-by: kbuild test robot <fengguang.wu@intel.com>
>> Reported-by: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
>> Cc: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
>> Cc: Peter Rosin <peda@axentia.se>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>
>Acked-by: Peter Rosin <peda@axentia.se>
>
>Thanks!
Thanks for sorting this.
Acked-by: Jonathan Cameron <jic23@kernel.org>
>
>Cheers,
>Peter

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] i2c: mux: fix up dependencies
  2016-11-14 14:34 [PATCH v2] i2c: mux: fix up dependencies Linus Walleij
  2016-11-14 14:39 ` Peter Rosin
@ 2016-11-14 17:24 ` Wolfram Sang
  1 sibling, 0 replies; 4+ messages in thread
From: Wolfram Sang @ 2016-11-14 17:24 UTC (permalink / raw)
  To: Linus Walleij; +Cc: linux-i2c, stable, Jonathan Cameron, Peter Rosin

[-- Attachment #1: Type: text/plain, Size: 1209 bytes --]

On Mon, Nov 14, 2016 at 03:34:17PM +0100, Linus Walleij wrote:
> 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.
> 
> Cc: stable@vger.kernel.org
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Reported-by: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
> Cc: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
> Cc: Peter Rosin <peda@axentia.se>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Applied to for-current, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-14 18:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-14 14:34 [PATCH v2] i2c: mux: fix up dependencies Linus Walleij
2016-11-14 14:39 ` Peter Rosin
2016-11-14 17:13   ` Jonathan Cameron
2016-11-14 17:24 ` Wolfram Sang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).