* [PATCH] pinctrl: aw9523: allow building as loadable module
@ 2024-03-07 14:06 Arnd Bergmann
2024-03-07 14:34 ` Linus Walleij
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2024-03-07 14:06 UTC (permalink / raw)
To: Linus Walleij, AngeloGioacchino Del Regno, David Bauer,
Krzysztof Kozlowski
Cc: Arnd Bergmann, Andy Shevchenko, linux-gpio, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When CONFIG_I2C is set to =m, the new aw9523 driver fails to link:
arm-linux-gnueabi-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_probe':
pinctrl-aw9523.c:(.text+0x9f8): undefined reference to `__devm_regmap_init_i2c'
arm-linux-gnueabi-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_driver_init':
pinctrl-aw9523.c:(.init.text+0x4): undefined reference to `i2c_register_driver'
arm-linux-gnueabi-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_driver_exit':
pinctrl-aw9523.c:(.exit.text+0x2): undefined reference to `i2c_del_driver'
Make it a tristate symbol so the dependency is correctly honored.
Fixes: bfa5aa367a82 ("pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/pinctrl/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index 21d38bf2d1ca..d45657aa986a 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -128,7 +128,7 @@ config PINCTRL_AXP209
Say Y to enable pinctrl and GPIO support for the AXP209 PMIC.
config PINCTRL_AW9523
- bool "Awinic AW9523/AW9523B I2C GPIO expander pinctrl driver"
+ tristate "Awinic AW9523/AW9523B I2C GPIO expander pinctrl driver"
depends on OF && I2C
select PINMUX
select PINCONF
--
2.39.2
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] pinctrl: aw9523: allow building as loadable module
2024-03-07 14:06 [PATCH] pinctrl: aw9523: allow building as loadable module Arnd Bergmann
@ 2024-03-07 14:34 ` Linus Walleij
0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2024-03-07 14:34 UTC (permalink / raw)
To: Arnd Bergmann
Cc: AngeloGioacchino Del Regno, David Bauer, Krzysztof Kozlowski,
Arnd Bergmann, Andy Shevchenko, linux-gpio, linux-kernel
On Thu, Mar 7, 2024 at 3:07 PM Arnd Bergmann <arnd@kernel.org> wrote:
> When CONFIG_I2C is set to =m, the new aw9523 driver fails to link:
>
> arm-linux-gnueabi-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_probe':
> pinctrl-aw9523.c:(.text+0x9f8): undefined reference to `__devm_regmap_init_i2c'
> arm-linux-gnueabi-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_driver_init':
> pinctrl-aw9523.c:(.init.text+0x4): undefined reference to `i2c_register_driver'
> arm-linux-gnueabi-ld: drivers/pinctrl/pinctrl-aw9523.o: in function `aw9523_driver_exit':
> pinctrl-aw9523.c:(.exit.text+0x2): undefined reference to `i2c_del_driver'
>
> Make it a tristate symbol so the dependency is correctly honored.
>
> Fixes: bfa5aa367a82 ("pinctrl: Add driver for Awinic AW9523/B I2C GPIO Expander")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
I sent something similar yesterday:
https://lore.kernel.org/linux-gpio/20240305-fix-aw9523-v2-1-2dc50bab2b17@linaro.org/
Thanks anyway!
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-07 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-07 14:06 [PATCH] pinctrl: aw9523: allow building as loadable module Arnd Bergmann
2024-03-07 14:34 ` 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®