public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h
@ 2020-07-16  6:24 Vinod Koul
  2020-07-16  6:54 ` Chen-Yu Tsai
  2020-07-16 15:22 ` Randy Dunlap
  0 siblings, 2 replies; 3+ messages in thread
From: Vinod Koul @ 2020-07-16  6:24 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: Randy Dunlap, Chen-Yu Tsai, Krzysztof Kozlowski, linux-kernel,
	Vinod Koul, Maxime Ripard, linux-arm-kernel

Driver uses GPIO functions but doesn't include the header explcitly. Add
that to fix build errors when GPIOLIB is disabled.

drivers/phy/allwinner/phy-sun4i-usb.c:367:11: error: implicit
declaration of function ‘gpiod_get_value_cansleep’; did you mean
‘gpio_get_value_cansleep’? [-Werror=implicit-function-declaration]
drivers/phy/allwinner/phy-sun4i-usb.c:707:22: error: implicit
declaration of function ‘devm_gpiod_get_optional’; did you mean
‘devm_clk_get_optional’? [-Werror=implicit-function-declaration]
drivers/phy/allwinner/phy-sun4i-usb.c:708:11: error: ‘GPIOD_IN’
undeclared (first use in this function); did you mean ‘GPIOF_IN’?
drivers/phy/allwinner/phy-sun4i-usb.c:815:21: error: implicit
declaration of function ‘gpiod_to_irq’; did you mean ‘gpio_to_irq’?
[-Werror=implicit-function-declaration]

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/phy/allwinner/phy-sun4i-usb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 7e09ad6a0b42..585d0a59e712 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/err.h>
 #include <linux/extcon-provider.h>
+#include <linux/gpio/consumer.h>
 #include <linux/io.h>
 #include <linux/interrupt.h>
 #include <linux/kernel.h>
-- 
2.26.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h
  2020-07-16  6:24 [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h Vinod Koul
@ 2020-07-16  6:54 ` Chen-Yu Tsai
  2020-07-16 15:22 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Chen-Yu Tsai @ 2020-07-16  6:54 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Randy Dunlap, linux-kernel, Krzysztof Kozlowski,
	Kishon Vijay Abraham I, Maxime Ripard, linux-arm-kernel

On Thu, Jul 16, 2020 at 2:24 PM Vinod Koul <vkoul@kernel.org> wrote:
>
> Driver uses GPIO functions but doesn't include the header explcitly. Add
> that to fix build errors when GPIOLIB is disabled.
>
> drivers/phy/allwinner/phy-sun4i-usb.c:367:11: error: implicit
> declaration of function ‘gpiod_get_value_cansleep’; did you mean
> ‘gpio_get_value_cansleep’? [-Werror=implicit-function-declaration]
> drivers/phy/allwinner/phy-sun4i-usb.c:707:22: error: implicit
> declaration of function ‘devm_gpiod_get_optional’; did you mean
> ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration]
> drivers/phy/allwinner/phy-sun4i-usb.c:708:11: error: ‘GPIOD_IN’
> undeclared (first use in this function); did you mean ‘GPIOF_IN’?
> drivers/phy/allwinner/phy-sun4i-usb.c:815:21: error: implicit
> declaration of function ‘gpiod_to_irq’; did you mean ‘gpio_to_irq’?
> [-Werror=implicit-function-declaration]
>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>

Maybe add

Fixes: ba4bdc9e1dc0 ("PHY: sunxi: Add driver for sunxi usb phy") ?

Though it probably doesn't apply cleanly on the oldest stable
kernel due to the extcon-provider header.

Either way,

Acked-by: Chen-Yu Tsai <wens@csie.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h
  2020-07-16  6:24 [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h Vinod Koul
  2020-07-16  6:54 ` Chen-Yu Tsai
@ 2020-07-16 15:22 ` Randy Dunlap
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2020-07-16 15:22 UTC (permalink / raw)
  To: Vinod Koul, Kishon Vijay Abraham I
  Cc: linux-arm-kernel, Chen-Yu Tsai, Krzysztof Kozlowski, linux-kernel,
	Maxime Ripard

On 7/15/20 11:24 PM, Vinod Koul wrote:
> Driver uses GPIO functions but doesn't include the header explcitly. Add
> that to fix build errors when GPIOLIB is disabled.
> 
> drivers/phy/allwinner/phy-sun4i-usb.c:367:11: error: implicit
> declaration of function ‘gpiod_get_value_cansleep’; did you mean
> ‘gpio_get_value_cansleep’? [-Werror=implicit-function-declaration]
> drivers/phy/allwinner/phy-sun4i-usb.c:707:22: error: implicit
> declaration of function ‘devm_gpiod_get_optional’; did you mean
> ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration]
> drivers/phy/allwinner/phy-sun4i-usb.c:708:11: error: ‘GPIOD_IN’
> undeclared (first use in this function); did you mean ‘GPIOF_IN’?
> drivers/phy/allwinner/phy-sun4i-usb.c:815:21: error: implicit
> declaration of function ‘gpiod_to_irq’; did you mean ‘gpio_to_irq’?
> [-Werror=implicit-function-declaration]
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested

Thanks.

> ---
>  drivers/phy/allwinner/phy-sun4i-usb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
> index 7e09ad6a0b42..585d0a59e712 100644
> --- a/drivers/phy/allwinner/phy-sun4i-usb.c
> +++ b/drivers/phy/allwinner/phy-sun4i-usb.c
> @@ -16,6 +16,7 @@
>  #include <linux/delay.h>
>  #include <linux/err.h>
>  #include <linux/extcon-provider.h>
> +#include <linux/gpio/consumer.h>
>  #include <linux/io.h>
>  #include <linux/interrupt.h>
>  #include <linux/kernel.h>
> 


-- 
~Randy

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2020-07-16 15:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-16  6:24 [PATCH] phy: sun4i-usb: explicitly include gpio/consumer.h Vinod Koul
2020-07-16  6:54 ` Chen-Yu Tsai
2020-07-16 15:22 ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox