* build error with CONFIG_REGMAP=m and CONFIG_REGULATOR=y
@ 2013-11-17 15:06 Hauke Mehrtens
2013-11-17 15:27 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Hauke Mehrtens @ 2013-11-17 15:06 UTC (permalink / raw)
To: broonie, lgirdwood, LKML
Hi,
In OpenWrt we are seeing some build errors when CONFIG_REGMAP=m and
CONFIG_REGULATOR=y are set.
/drivers/regulator/core.c accesses some regmap functions, but they are
compiled into a module and not into a kernel. When CONFIG_REGMAP is not
set the header file replaces the functions with empty static inline
functions.
With kernel 3.10.18 I see the following build error:
drivers/built-in.o: In function `regulator_get_bypass_regmap':
/drivers/regulator/core.c:2989: undefined reference to `regmap_read'
drivers/built-in.o: In function `regulator_get_voltage_sel_regmap':
/drivers/regulator/core.c:2199: undefined reference to `regmap_read'
drivers/built-in.o: In function `regulator_is_enabled_regmap':
/drivers/regulator/core.c:1916: undefined reference to `regmap_read'
drivers/built-in.o: In function `regulator_set_bypass_regmap':
/drivers/regulator/core.c:2973: undefined reference to `regmap_update_bits'
drivers/built-in.o: In function `regulator_set_voltage_sel_regmap':
/drivers/regulator/core.c:2226: undefined reference to `regmap_update_bits'
/drivers/regulator/core.c:2232: undefined reference to `regmap_update_bits'
drivers/built-in.o: In function `regulator_disable_regmap':
/drivers/regulator/core.c:1968: undefined reference to `regmap_update_bits'
drivers/built-in.o: In function `regulator_enable_regmap':
/drivers/regulator/core.c:1945: undefined reference to `regmap_update_bits'
drivers/built-in.o: In function `regulator_register':
/drivers/regulator/core.c:3581: undefined reference to `dev_get_regmap'
/drivers/regulator/core.c:3582: undefined reference to `dev_get_regmap'
/drivers/regulator/core.c:3584: undefined reference to `dev_get_regmap'
make[4]: *** [vmlinux] Error 1
The following patch would be a solution, but it causes a recursive
dependency:
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -1,5 +1,6 @@
menuconfig REGULATOR
bool "Voltage and Current Regulator Support"
+ depends on REGMAP || REGMAP = n
help
Generic Voltage and Current Regulator support.
drivers/regulator/Kconfig:1:error: recursive dependency detected!
drivers/regulator/Kconfig:1: symbol REGULATOR depends on REGMAP
drivers/base/regmap/Kconfig:5: symbol REGMAP is selected by REGMAP_I2C
drivers/base/regmap/Kconfig:11: symbol REGMAP_I2C is selected by
REGULATOR_FAN53555
drivers/regulator/Kconfig:124: symbol REGULATOR_FAN53555 depends on
REGULATOR
I am not familiar with the regmap and the regulator framework, but I
would suggest to make REGULATOR depend on REGMAP.
Hauke
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: build error with CONFIG_REGMAP=m and CONFIG_REGULATOR=y
2013-11-17 15:06 build error with CONFIG_REGMAP=m and CONFIG_REGULATOR=y Hauke Mehrtens
@ 2013-11-17 15:27 ` Mark Brown
2013-11-17 16:00 ` Hauke Mehrtens
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2013-11-17 15:27 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: lgirdwood, LKML
[-- Attachment #1: Type: text/plain, Size: 273 bytes --]
On Sun, Nov 17, 2013 at 04:06:45PM +0100, Hauke Mehrtens wrote:
> In OpenWrt we are seeing some build errors when CONFIG_REGMAP=m and
> CONFIG_REGULATOR=y are set.
REGMAP is a bool config option, it should not be possible to set it to m.
How have you managed to do that?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: build error with CONFIG_REGMAP=m and CONFIG_REGULATOR=y
2013-11-17 15:27 ` Mark Brown
@ 2013-11-17 16:00 ` Hauke Mehrtens
0 siblings, 0 replies; 3+ messages in thread
From: Hauke Mehrtens @ 2013-11-17 16:00 UTC (permalink / raw)
To: Mark Brown; +Cc: lgirdwood, LKML
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 11/17/2013 04:27 PM, Mark Brown wrote:
> On Sun, Nov 17, 2013 at 04:06:45PM +0100, Hauke Mehrtens wrote:
>
>> In OpenWrt we are seeing some build errors when CONFIG_REGMAP=m
>> and CONFIG_REGULATOR=y are set.
>
> REGMAP is a bool config option, it should not be possible to set it
> to m. How have you managed to do that?
>
Sorry, I you are right, I just saw we have a patch applied on top of
the mainline kernel which makes it possible to build REGMAP as module.
Hauke
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSiOgfAAoJEIZ0px9YPRMygR4P/inb+qZKSSA7qloN2ipKasbC
mDKV/LivY6l3Je+rWTRCESkGOw0jO09rO1AizCoUN47u6yYuC6/IGIPioDXTciFf
iDl46Lhfirv3rlWyrQTC6ZAAxcQUzFJNgXD0hb+ehw3MBC9okB5NQgq9QATtpW9L
Bbu7vCgqG7bxCXXq0DW/ygPMR5axKWQwbQdDCfz+06wYqWQqj2okWtHvhXCe7Skb
ROZ8FvOcnXKKjoGOEJRtbcfUt44dIM8RGJtKj5vjXtnSm+eJQhL1OzqUxOY7OODW
Fxqs97N7rrsPVwXNRYSrHjtmul3feLUaxALXQiSskjS8zJsJBgR9jGJjMp2auN5B
4ffxa0+thFsSNSXQd2bfDPnZzZKZf2EWr3h0BqWZPjN60pIji/WUXMSecVd+9zNH
axONP2lKOp0hPxsSi0hvLUGHAyAsOTzShPKjV+vIosb9aFn5/3GeQqOrY6abmF/1
HPoIds00q2B9VVV83PQeLvMFhjcW++1HDhP7QJ+QiUByN9I96M1Awd27ypsf5PT/
fKqIgumJk2Jy3rKmpOwMHlpONBhD39qW3tb9lmiXeWgAdvaSH/kuR5Lwsbe3vhvg
p+hTwmubGTwFHaIKUD7APJk7daYUwR8VEP3fbwsYc3bCGMtN61FNyl5HymYteJMg
0g4dQrXMaPTZJcMTp4nz
=LoHr
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-17 16:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-17 15:06 build error with CONFIG_REGMAP=m and CONFIG_REGULATOR=y Hauke Mehrtens
2013-11-17 15:27 ` Mark Brown
2013-11-17 16:00 ` Hauke Mehrtens
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®