Skip to contentSkip to conversation

regulator: kconfig: make max8973 driver to depend on GPIOLIB

PATCH In review Laxman Dewangan 2 participants 3 messages Apr 8, 2015 – Apr 9, 2015 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: kconfig: make max8973 driver to depend on GPIOLIB

MAX8973 regulator driver uses the GPIO APIs for accessing the control signal connected to its pin from host processor.

Make this driver depends on GPIOLIB.

---
 drivers/regulator/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/regulator/Kconfig +1 -0
index a6f116a..a74ca4e 100644
@@ -364,6 +364,7 @@ config REGULATOR_MAX8952
 config REGULATOR_MAX8973
 	tristate "Maxim MAX8973 voltage regulator "
 	depends on I2C
+	depends on GPIOLIB
 	select REGMAP_I2C
 	help
 	  The MAXIM MAX8973 high-efficiency. three phase, DC-DC step-down
Signature · 1 line
1.8.1.5
maintainer
#1 lore raw
Quoted 4 lines · Laxman Dewangan

MAX8973 regulator driver uses the GPIO APIs for accessing the control signal connected to its pin from host processor.

Make this driver depends on GPIOLIB.

The GPIO usage in the driver appears to be optional, it handles the GPIO not being controllable. This suggests to me that the gpiolib dependency shouldn't be required and that it would be better to fix this by ensuring that all the gpiolib functions being used have appropriate stubs. Which ones are causing problems?

#2 lore raw
Quoted 6 lines · Mark Brown

* PGP Signed by an unknown key

Quoted 3 lines · Laxman Dewangan

MAX8973 regulator driver uses the GPIO APIs for accessing the control signal connected to its pin from host processor.

Quoted 7 lines
Quoted 1 line

Make this driver depends on GPIOLIB.

The GPIO usage in the driver appears to be optional, it handles the GPIO not being controllable. This suggests to me that the gpiolib dependency shouldn't be required and that it would be better to fix this by ensuring that all the gpiolib functions being used have appropriate stubs. Which ones are causing problems?

Thanks for review.

Sometime ago, I got the comiplation error on random config for one of architecture which was not having GPIO architecture. The compilation error was reported on tps62360-regulator.c which is also using similar i2c calls.

So to avoid similar issue, I make this depends on GPIOLIB.

However, I looked gpio.h and it has all required APIs as static inline if GPIOLIB is not there so atleast compilation issue will not be there.

Now going through code, I think if gpios are not there then also it should work. Not tested this on my board as I can not boot without gpio.

I think we can drop this patch.

Thanks,
Laxman