All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: bd71815: include <linux/of.h> and <linux/gpio/consumer.h>
@ 2021-04-22 13:33 Arnd Bergmann
  2021-04-23  4:54 ` Matti Vaittinen
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-04-22 13:33 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Matti Vaittinen, Lee Jones
  Cc: Arnd Bergmann, linux-power, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

The new driver causes a build failure because of a missing includes:

drivers/regulator/bd71815-regulator.c: In function 'buck12_set_hw_dvs_levels':
drivers/regulator/bd71815-regulator.c:210:13: error: implicit declaration of function 'of_find_property' [-Werror=implicit-function-declaration]
  210 |         if (of_find_property(np, "rohm,dvs-run-voltage", NULL) ||
      |             ^~~~~~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c: At top level:
drivers/regulator/bd71815-regulator.c:461:37: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
  461 |                         .of_match = of_match_ptr(#_name),               \
      |                                     ^~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c: In function 'bd7181x_probe':
drivers/regulator/bd71815-regulator.c:590:19: error: implicit declaration of function 'devm_gpiod_get_from_of_node' [-Werror=implicit-function-declaration]
  590 |         ldo4_en = devm_gpiod_get_from_of_node(&pdev->dev,
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/regulator/bd71815-regulator.c:593:50: error: 'GPIOD_ASIS' undeclared (first use in this function); did you mean 'GPIOF_IN'?
  593 |                                                  GPIOD_ASIS, "ldo4-en");
      |                                                  ^~~~~~~~~~
      |                                                  GPIOF_IN

Fixes: 1aad39001e85 ("regulator: Support ROHM BD71815 regulators")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
As found yesterday with another patch I sent for this driver,
it is apparently not part of the regulator tree but only merged
through Lee's mfd tree.
---
 drivers/regulator/bd71815-regulator.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/regulator/bd71815-regulator.c b/drivers/regulator/bd71815-regulator.c
index a4e8d5e36b40..5be2b01632a0 100644
--- a/drivers/regulator/bd71815-regulator.c
+++ b/drivers/regulator/bd71815-regulator.c
@@ -16,9 +16,10 @@
 #include <linux/regulator/driver.h>
 #include <linux/delay.h>
 #include <linux/slab.h>
-#include <linux/gpio.h>
+#include <linux/gpio/consumer.h>
 #include <linux/mfd/rohm-generic.h>
 #include <linux/mfd/rohm-bd71815.h>
+#include <linux/of.h>
 #include <linux/regulator/of_regulator.h>
 
 struct bd71815_regulator {
-- 
2.29.2


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

* Re: [PATCH] regulator: bd71815: include <linux/of.h> and <linux/gpio/consumer.h>
  2021-04-22 13:33 [PATCH] regulator: bd71815: include <linux/of.h> and <linux/gpio/consumer.h> Arnd Bergmann
@ 2021-04-23  4:54 ` Matti Vaittinen
  0 siblings, 0 replies; 2+ messages in thread
From: Matti Vaittinen @ 2021-04-23  4:54 UTC (permalink / raw)
  To: Arnd Bergmann, Liam Girdwood, Mark Brown, Lee Jones
  Cc: Arnd Bergmann, linux-power, linux-kernel


On Thu, 2021-04-22 at 15:33 +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> The new driver causes a build failure because of a missing includes:

Odd that I never saw these errors. Thanks for the fix anyways! Much
appreciated.

> drivers/regulator/bd71815-regulator.c: In function
> 'buck12_set_hw_dvs_levels':
> drivers/regulator/bd71815-regulator.c:210:13: error: implicit
> declaration of function 'of_find_property' [-Werror=implicit-
> function-declaration]
>   210 |         if (of_find_property(np, "rohm,dvs-run-voltage",
> NULL) ||
>       |             ^~~~~~~~~~~~~~~~
> drivers/regulator/bd71815-regulator.c: At top level:
> drivers/regulator/bd71815-regulator.c:461:37: error: implicit
> declaration of function 'of_match_ptr' [-Werror=implicit-function-
> declaration]
>   461 |                         .of_match =
> of_match_ptr(#_name),               \
>       |                                     ^~~~~~~~~~~~
> drivers/regulator/bd71815-regulator.c: In function 'bd7181x_probe':
> drivers/regulator/bd71815-regulator.c:590:19: error: implicit
> declaration of function 'devm_gpiod_get_from_of_node' [-
> Werror=implicit-function-declaration]
>   590 |         ldo4_en = devm_gpiod_get_from_of_node(&pdev->dev,
>       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/regulator/bd71815-regulator.c:593:50: error: 'GPIOD_ASIS'
> undeclared (first use in this function); did you mean 'GPIOF_IN'?
>   593 |                                                  GPIOD_ASIS,
> "ldo4-en");
>       |                                                  ^~~~~~~~~~
>       |                                                  GPIOF_IN
> 
> Fixes: 1aad39001e85 ("regulator: Support ROHM BD71815 regulators")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> As found yesterday with another patch I sent for this driver,
> it is apparently not part of the regulator tree but only merged
> through Lee's mfd tree.
> ---
>  drivers/regulator/bd71815-regulator.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/bd71815-regulator.c
> b/drivers/regulator/bd71815-regulator.c
> index a4e8d5e36b40..5be2b01632a0 100644
> --- a/drivers/regulator/bd71815-regulator.c
> +++ b/drivers/regulator/bd71815-regulator.c
> @@ -16,9 +16,10 @@
>  #include <linux/regulator/driver.h>
>  #include <linux/delay.h>
>  #include <linux/slab.h>
> -#include <linux/gpio.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/mfd/rohm-generic.h>
>  #include <linux/mfd/rohm-bd71815.h>
> +#include <linux/of.h>
>  #include <linux/regulator/of_regulator.h>
>  
>  struct bd71815_regulator {



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

end of thread, other threads:[~2021-04-23  4:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 13:33 [PATCH] regulator: bd71815: include <linux/of.h> and <linux/gpio/consumer.h> Arnd Bergmann
2021-04-23  4:54 ` Matti Vaittinen

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.