mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 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

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®