From: Hauke Mehrtens <hauke@hauke-m.de>
To: broonie@kernel.org, lgirdwood@gmail.com,
LKML <linux-kernel@vger.kernel.org>
Subject: build error with CONFIG_REGMAP=m and CONFIG_REGULATOR=y
Date: Sun, 17 Nov 2013 16:06:45 +0100 [thread overview]
Message-ID: <5288DB85.8060105@hauke-m.de> (raw)
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
next reply other threads:[~2013-11-17 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-17 15:06 Hauke Mehrtens [this message]
2013-11-17 15:27 ` Mark Brown
2013-11-17 16:00 ` Hauke Mehrtens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5288DB85.8060105@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®