* [PATCH] regulator: mcp16502: Include linux/gpio/consumer.h to fix build error
@ 2019-01-27 8:51 Axel Lin
2019-01-28 8:20 ` Nicolas.Ferre
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2019-01-27 8:51 UTC (permalink / raw)
To: Mark Brown; +Cc: Nicolas.Ferre, Liam Girdwood, linux-kernel, Axel Lin
Fix below build error:
drivers/regulator/mcp16502.c: In function ‘mcp16502_gpio_set_mode’:
drivers/regulator/mcp16502.c:135:3: error: implicit declaration of function ‘gpiod_set_value’; did you mean ‘gpio_set_value’? [-Werror=implicit-function-declaration]
gpiod_set_value(mcp->lpm, 0);
^~~~~~~~~~~~~~~
gpio_set_value
drivers/regulator/mcp16502.c: In function ‘mcp16502_probe’:
drivers/regulator/mcp16502.c:486:13: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]
mcp->lpm = devm_gpiod_get(dev, "lpm", GPIOD_OUT_LOW);
^~~~~~~~~~~~~~
devm_gpio_free
drivers/regulator/mcp16502.c:486:40: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
mcp->lpm = devm_gpiod_get(dev, "lpm", GPIOD_OUT_LOW);
^~~~~~~~~~~~~
GPIOF_INIT_LOW
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/regulator/mcp16502.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
index 3479ae009b0b..0fc4963bd5b0 100644
--- a/drivers/regulator/mcp16502.c
+++ b/drivers/regulator/mcp16502.c
@@ -17,6 +17,7 @@
#include <linux/regmap.h>
#include <linux/regulator/driver.h>
#include <linux/suspend.h>
+#include <linux/gpio/consumer.h>
#define VDD_LOW_SEL 0x0D
#define VDD_HIGH_SEL 0x3F
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] regulator: mcp16502: Include linux/gpio/consumer.h to fix build error
2019-01-27 8:51 [PATCH] regulator: mcp16502: Include linux/gpio/consumer.h to fix build error Axel Lin
@ 2019-01-28 8:20 ` Nicolas.Ferre
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas.Ferre @ 2019-01-28 8:20 UTC (permalink / raw)
To: axel.lin, broonie
Cc: lgirdwood, linux-kernel, linux-arm-kernel, Claudiu.Beznea
On 27/01/2019 at 09:51, Axel Lin wrote:
> Fix below build error:
> drivers/regulator/mcp16502.c: In function ‘mcp16502_gpio_set_mode’:
> drivers/regulator/mcp16502.c:135:3: error: implicit declaration of function ‘gpiod_set_value’; did you mean ‘gpio_set_value’? [-Werror=implicit-function-declaration]
> gpiod_set_value(mcp->lpm, 0);
> ^~~~~~~~~~~~~~~
> gpio_set_value
> drivers/regulator/mcp16502.c: In function ‘mcp16502_probe’:
> drivers/regulator/mcp16502.c:486:13: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]
> mcp->lpm = devm_gpiod_get(dev, "lpm", GPIOD_OUT_LOW);
> ^~~~~~~~~~~~~~
> devm_gpio_free
> drivers/regulator/mcp16502.c:486:40: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
> mcp->lpm = devm_gpiod_get(dev, "lpm", GPIOD_OUT_LOW);
> ^~~~~~~~~~~~~
> GPIOF_INIT_LOW
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Thanks Alex!
> ---
> drivers/regulator/mcp16502.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/regulator/mcp16502.c b/drivers/regulator/mcp16502.c
> index 3479ae009b0b..0fc4963bd5b0 100644
> --- a/drivers/regulator/mcp16502.c
> +++ b/drivers/regulator/mcp16502.c
> @@ -17,6 +17,7 @@
> #include <linux/regmap.h>
> #include <linux/regulator/driver.h>
> #include <linux/suspend.h>
> +#include <linux/gpio/consumer.h>
>
> #define VDD_LOW_SEL 0x0D
> #define VDD_HIGH_SEL 0x3F
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-01-28 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-27 8:51 [PATCH] regulator: mcp16502: Include linux/gpio/consumer.h to fix build error Axel Lin
2019-01-28 8:20 ` Nicolas.Ferre
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).