Skip to contentSkip to conversation

regulator: tps65217: fix build error if REGULATOR is not enabled

PATCH In review AnilKumar Ch 2 participants 5 messages Jul 18, 2012 – Jul 19, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: tps65217: fix build error if REGULATOR is not enabled

Fixes below build error if CONFIG_REGULATOR is not enabled.

drivers/built-in.o: In function `tps65217_probe':
tps65217.c:(.devinit.text+0x13e37): undefined reference to `of_regulator_match'

---
 drivers/mfd/Kconfig |    1 +
 1 file changed, 1 insertion(+)
drivers/mfd/Kconfig +1 -0
index e129c82..01c929a 100644
@@ -159,6 +159,7 @@ config TPS6507X
 config MFD_TPS65217
 	tristate "TPS65217 Power Management / White LED chips"
 	depends on I2C
+	depends on REGULATOR
 	select MFD_CORE
 	select REGMAP_I2C
 	help
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 4 lines · AnilKumar Ch

Fixes below build error if CONFIG_REGULATOR is not enabled.

drivers/built-in.o: In function `tps65217_probe':
tps65217.c:(.devinit.text+0x13e37): undefined reference to `of_regulator_match'

This isn't a patch to the regulator driver, this is a patch to the MFD. Normally this would be fixed by making the MFD driver not depend on the regulator API - why is the MFD driver using the regulator API?

#2 lore raw

Mark,

Quoted 10 lines · Mark Brown
Quoted 4 lines · AnilKumar Ch

Fixes below build error if CONFIG_REGULATOR is not enabled.

drivers/built-in.o: In function `tps65217_probe':
tps65217.c:(.devinit.text+0x13e37): undefined reference to `of_regulator_match'

This isn't a patch to the regulator driver, this is a patch to the MFD. Normally this would be fixed by making the MFD driver not depend on the regulator API - why is the MFD driver using the regulator API?

Regulators platform data is added to platform device in MFD driver, which we need for regulator driver, of_regulator_match() is used to check the regulator consumers if we pass DT data. If we do not enable CONFIG_REGULATOR then of_regulator_match() is not exported, so we see this error.

Regards
AnilKumar

#3 lore raw
Quoted 4 lines · Chimata

Regulators platform data is added to platform device in MFD driver, which we need for regulator driver, of_regulator_match() is used to check the regulator consumers if we pass DT data. If we do not enable CONFIG_REGULATOR then of_regulator_match() is not exported, so we see this error.

Why are you doing that in the MFD driver?

#4 lore raw

Hi Mark,

Quoted 9 lines · Mark Brown
Quoted 4 lines · Chimata

Regulators platform data is added to platform device in MFD driver, which we need for regulator driver, of_regulator_match() is used to check the regulator consumers if we pass DT data. If we do not enable CONFIG_REGULATOR then of_regulator_match() is not exported, so we see this error.

Why are you doing that in the MFD driver?

I got your point, I referred tps6586x driver while developing the initial driver. Based on tps6586x MFD driver I added REGULATOR flag. I think tps6586x MFD driver need to be cleaned up.

I will submit a patch to make tps65217 MFD driver independent of REGULATOR framework.

Thanks
AnilKumar