All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: kconfig: make max8973 driver to depend on GPIOLIB
@ 2015-04-08 13:37 Laxman Dewangan
  2015-04-08 16:43 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Laxman Dewangan @ 2015-04-08 13:37 UTC (permalink / raw)
  To: broonie, lgirdwood; +Cc: linux-kernel, 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.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
---
 drivers/regulator/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index a6f116a..a74ca4e 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -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
-- 
1.8.1.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: kconfig: make max8973 driver to depend on GPIOLIB
  2015-04-08 13:37 [PATCH] regulator: kconfig: make max8973 driver to depend on GPIOLIB Laxman Dewangan
@ 2015-04-08 16:43 ` Mark Brown
  2015-04-09 10:01   ` Laxman Dewangan
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2015-04-08 16:43 UTC (permalink / raw)
  To: Laxman Dewangan; +Cc: lgirdwood, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 562 bytes --]

On Wed, Apr 08, 2015 at 07:07:07PM +0530, Laxman Dewangan wrote:
> 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?

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] regulator: kconfig: make max8973 driver to depend on GPIOLIB
  2015-04-08 16:43 ` Mark Brown
@ 2015-04-09 10:01   ` Laxman Dewangan
  0 siblings, 0 replies; 3+ messages in thread
From: Laxman Dewangan @ 2015-04-09 10:01 UTC (permalink / raw)
  To: Mark Brown; +Cc: lgirdwood, linux-kernel

On Wednesday 08 April 2015 10:13 PM, Mark Brown wrote:
> * PGP Signed by an unknown key
>
> On Wed, Apr 08, 2015 at 07:07:07PM +0530, Laxman Dewangan wrote:
>> 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?
>

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-09 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-08 13:37 [PATCH] regulator: kconfig: make max8973 driver to depend on GPIOLIB Laxman Dewangan
2015-04-08 16:43 ` Mark Brown
2015-04-09 10:01   ` Laxman Dewangan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.