* [PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m
@ 2013-05-19 11:11 Axel Lin
2013-05-19 12:31 ` Andy Shevchenko
2013-05-20 17:17 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-05-19 11:11 UTC (permalink / raw)
To: Grant Likely, Linus Walleij; +Cc: Lars Poeschel, Peter Korsgaard, linux-kernel
This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m &&
CONFIG_GPIO_MCP23S08=y.
LD init/built-in.o
drivers/built-in.o: In function `mcp23017_write':
clkdev.c:(.text+0x1e14): undefined reference to `i2c_smbus_write_word_data'
drivers/built-in.o: In function `mcp23017_read':
clkdev.c:(.text+0x1e24): undefined reference to `i2c_smbus_read_word_data'
drivers/built-in.o: In function `mcp23008_write':
clkdev.c:(.text+0x1e8c): undefined reference to `i2c_smbus_write_byte_data'
drivers/built-in.o: In function `mcp23008_read':
clkdev.c:(.text+0x1e98): undefined reference to `i2c_smbus_read_byte_data'
drivers/built-in.o: In function `mcp23008_read_regs':
clkdev.c:(.text+0x1ed0): undefined reference to `i2c_smbus_read_byte_data'
drivers/built-in.o: In function `mcp23s08_init':
clkdev.c:(.init.text+0x30): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `mcp23s08_exit':
clkdev.c:(.exit.text+0x30): undefined reference to `i2c_del_driver'
make: *** [vmlinux] Error 1
When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support.
Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m.
The real fix though is to break the driver apart into a SPI part, an I2C part
and a common part. But that's something for 3.11 while this is something for
3.10/stable.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/gpio/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 87d5670..6575d77 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -636,7 +636,7 @@ config GPIO_MAX7301
config GPIO_MCP23S08
tristate "Microchip MCP23xxx I/O expander"
- depends on SPI_MASTER || I2C
+ depends on (SPI_MASTER && !I2C) || I2C
help
SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
I/O expanders.
--
1.8.1.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m
2013-05-19 11:11 [PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m Axel Lin
@ 2013-05-19 12:31 ` Andy Shevchenko
2013-05-20 17:17 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2013-05-19 12:31 UTC (permalink / raw)
To: Axel Lin
Cc: Grant Likely, Linus Walleij, Lars Poeschel, Peter Korsgaard,
linux-kernel
This one I like a bit more.
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
On Sun, May 19, 2013 at 2:11 PM, Axel Lin <axel.lin@ingics.com> wrote:
> This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m &&
> CONFIG_GPIO_MCP23S08=y.
>
> LD init/built-in.o
> drivers/built-in.o: In function `mcp23017_write':
> clkdev.c:(.text+0x1e14): undefined reference to `i2c_smbus_write_word_data'
> drivers/built-in.o: In function `mcp23017_read':
> clkdev.c:(.text+0x1e24): undefined reference to `i2c_smbus_read_word_data'
> drivers/built-in.o: In function `mcp23008_write':
> clkdev.c:(.text+0x1e8c): undefined reference to `i2c_smbus_write_byte_data'
> drivers/built-in.o: In function `mcp23008_read':
> clkdev.c:(.text+0x1e98): undefined reference to `i2c_smbus_read_byte_data'
> drivers/built-in.o: In function `mcp23008_read_regs':
> clkdev.c:(.text+0x1ed0): undefined reference to `i2c_smbus_read_byte_data'
> drivers/built-in.o: In function `mcp23s08_init':
> clkdev.c:(.init.text+0x30): undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `mcp23s08_exit':
> clkdev.c:(.exit.text+0x30): undefined reference to `i2c_del_driver'
> make: *** [vmlinux] Error 1
>
> When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support.
> Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m.
>
> The real fix though is to break the driver apart into a SPI part, an I2C part
> and a common part. But that's something for 3.11 while this is something for
> 3.10/stable.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> drivers/gpio/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 87d5670..6575d77 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -636,7 +636,7 @@ config GPIO_MAX7301
>
> config GPIO_MCP23S08
> tristate "Microchip MCP23xxx I/O expander"
> - depends on SPI_MASTER || I2C
> + depends on (SPI_MASTER && !I2C) || I2C
> help
> SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017
> I/O expanders.
> --
> 1.8.1.2
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m
2013-05-19 11:11 [PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m Axel Lin
2013-05-19 12:31 ` Andy Shevchenko
@ 2013-05-20 17:17 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2013-05-20 17:17 UTC (permalink / raw)
To: Axel Lin; +Cc: Grant Likely, Lars Poeschel, Peter Korsgaard, linux-kernel
On Sun, May 19, 2013 at 1:11 PM, Axel Lin <axel.lin@ingics.com> wrote:
> This patch fixes below build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m &&
> CONFIG_GPIO_MCP23S08=y.
>
> LD init/built-in.o
> drivers/built-in.o: In function `mcp23017_write':
> clkdev.c:(.text+0x1e14): undefined reference to `i2c_smbus_write_word_data'
> drivers/built-in.o: In function `mcp23017_read':
> clkdev.c:(.text+0x1e24): undefined reference to `i2c_smbus_read_word_data'
> drivers/built-in.o: In function `mcp23008_write':
> clkdev.c:(.text+0x1e8c): undefined reference to `i2c_smbus_write_byte_data'
> drivers/built-in.o: In function `mcp23008_read':
> clkdev.c:(.text+0x1e98): undefined reference to `i2c_smbus_read_byte_data'
> drivers/built-in.o: In function `mcp23008_read_regs':
> clkdev.c:(.text+0x1ed0): undefined reference to `i2c_smbus_read_byte_data'
> drivers/built-in.o: In function `mcp23s08_init':
> clkdev.c:(.init.text+0x30): undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `mcp23s08_exit':
> clkdev.c:(.exit.text+0x30): undefined reference to `i2c_del_driver'
> make: *** [vmlinux] Error 1
>
> When CONFIG_I2C=m, meaning we can't build the drivers in with I2C support.
> Thus don't allow the drivers to be compiled as built-in when CONFIG_I2C=m.
>
> The real fix though is to break the driver apart into a SPI part, an I2C part
> and a common part. But that's something for 3.11 while this is something for
> 3.10/stable.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Applied for fixes with Andy's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-20 17:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-19 11:11 [PATCH v2] gpio: mcp23s08: Fix build error when CONFIG_SPI_MASTER=y && CONFIG_I2C=m Axel Lin
2013-05-19 12:31 ` Andy Shevchenko
2013-05-20 17:17 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®