Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1653013 > unrolled thread

[PATCH] pinctrl: mcp23s08: improve I2C Kconfig dependency

Started byArnd Bergmann <arnd@arndb.de>
First post2017-05-30 11:20 +0200
Last post2017-05-31 02:00 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] pinctrl: mcp23s08: improve I2C Kconfig dependency Arnd Bergmann <arnd@arndb.de> - 2017-05-30 11:20 +0200
    Re: [PATCH] pinctrl: mcp23s08: improve I2C Kconfig dependency Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-05-30 12:30 +0200
    Re: [PATCH] pinctrl: mcp23s08: improve I2C Kconfig dependency Linus Walleij <linus.walleij@linaro.org> - 2017-05-31 02:00 +0200

#1653013 — [PATCH] pinctrl: mcp23s08: improve I2C Kconfig dependency

FromArnd Bergmann <arnd@arndb.de>
Date2017-05-30 11:20 +0200
Subject[PATCH] pinctrl: mcp23s08: improve I2C Kconfig dependency
Message-ID<tMLtO-5qE-61@gated-at.bofh.it>
With "SPI_MASTER=y && I2C=m", we can build mcp23s08 as a built-in driver,
which then results in a link failure:

drivers/pinctrl/built-in.o: In function `mcp23s08_probe_one.isra.0':
:(.text+0x7910): undefined reference to `__devm_regmap_init_i2c'
drivers/pinctrl/built-in.o: In function `mcp23s08_init':
:(.init.text+0x110): undefined reference to `i2c_register_driver'
drivers/pinctrl/built-in.o: In function `mcp23s08_exit':
:(.exit.text+0x3c): undefined reference to `i2c_del_driver'

To avoid the problem, this adds another dependency on I2C that enforces
mcp23s08 to be a loadable module whenever the I2C core is a module.

Fixes: 64ac43e6fa28 ("gpio: mcp23s08: move to pinctrl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index becda8f47e9e..ab4630ea305c 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -149,6 +149,7 @@ config PINCTRL_FALCON
 config PINCTRL_MCP23S08
 	tristate "Microchip MCP23xxx I/O expander"
 	depends on SPI_MASTER || I2C
+	depends on I2C || I2C=n
 	select GPIOLIB_IRQCHIP
 	select REGMAP_I2C if I2C
 	select REGMAP_SPI if SPI_MASTER
-- 
2.9.0

[toc] | [next] | [standalone]


#1653084

FromSebastian Reichel <sebastian.reichel@collabora.co.uk>
Date2017-05-30 12:30 +0200
Message-ID<tMMzv-677-13@gated-at.bofh.it>
In reply to#1653013

[Multipart message — attachments visible in raw view] — view raw

Hi,

On Tue, May 30, 2017 at 11:11:28AM +0200, Arnd Bergmann wrote:
> With "SPI_MASTER=y && I2C=m", we can build mcp23s08 as a built-in driver,
> which then results in a link failure:
> 
> drivers/pinctrl/built-in.o: In function `mcp23s08_probe_one.isra.0':
> :(.text+0x7910): undefined reference to `__devm_regmap_init_i2c'
> drivers/pinctrl/built-in.o: In function `mcp23s08_init':
> :(.init.text+0x110): undefined reference to `i2c_register_driver'
> drivers/pinctrl/built-in.o: In function `mcp23s08_exit':
> :(.exit.text+0x3c): undefined reference to `i2c_del_driver'
> 
> To avoid the problem, this adds another dependency on I2C that enforces
> mcp23s08 to be a loadable module whenever the I2C core is a module.
> 
> Fixes: 64ac43e6fa28 ("gpio: mcp23s08: move to pinctrl")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>

-- Sebastian

> ---
>  drivers/pinctrl/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index becda8f47e9e..ab4630ea305c 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -149,6 +149,7 @@ config PINCTRL_FALCON
>  config PINCTRL_MCP23S08
>  	tristate "Microchip MCP23xxx I/O expander"
>  	depends on SPI_MASTER || I2C
> +	depends on I2C || I2C=n
>  	select GPIOLIB_IRQCHIP
>  	select REGMAP_I2C if I2C
>  	select REGMAP_SPI if SPI_MASTER
> -- 
> 2.9.0
> 

[toc] | [prev] | [next] | [standalone]


#1653726

FromLinus Walleij <linus.walleij@linaro.org>
Date2017-05-31 02:00 +0200
Message-ID<tMZdn-5ry-11@gated-at.bofh.it>
In reply to#1653013
On Tue, May 30, 2017 at 11:11 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> With "SPI_MASTER=y && I2C=m", we can build mcp23s08 as a built-in driver,
> which then results in a link failure:
>
> drivers/pinctrl/built-in.o: In function `mcp23s08_probe_one.isra.0':
> :(.text+0x7910): undefined reference to `__devm_regmap_init_i2c'
> drivers/pinctrl/built-in.o: In function `mcp23s08_init':
> :(.init.text+0x110): undefined reference to `i2c_register_driver'
> drivers/pinctrl/built-in.o: In function `mcp23s08_exit':
> :(.exit.text+0x3c): undefined reference to `i2c_del_driver'
>
> To avoid the problem, this adds another dependency on I2C that enforces
> mcp23s08 to be a loadable module whenever the I2C core is a module.
>
> Fixes: 64ac43e6fa28 ("gpio: mcp23s08: move to pinctrl")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Patch applied!

Yours,
Linus Walleij

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web