Skip to contentSkip to conversation

usb: dwc3: xilinx: include linux/gpio/consumer.h

PATCH In review Arnd Bergmann 2 participants 2 messages Jan 3, 2023 – Jan 4, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: dwc3: xilinx: include linux/gpio/consumer.h

From: Arnd Bergmann <[email protected]>

The newly added gpio consumer calls cause a build failure in configurations that fail to include the right header implicitly:

drivers/usb/dwc3/dwc3-xilinx.c: In function 'dwc3_xlnx_init_zynqmp':
drivers/usb/dwc3/dwc3-xilinx.c:207:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration]

  207 |         reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
      |                      ^~~~~~~~~~~~~~~~~~~~~~~
      |                      devm_clk_get_optional
Fixes ca05b38252d7 ("usb: dwc3: xilinx: Add gpio-reset support")
---
 drivers/usb/dwc3/dwc3-xilinx.c | 1 +
 1 file changed, 1 insertion(+)
drivers/usb/dwc3/dwc3-xilinx.c +1 -0
index 8607d4c23283..0745e9f11b2e 100644
@@ -13,6 +13,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
+#include <linux/gpio/consumer.h>
 #include <linux/of_gpio.h>
 #include <linux/of_platform.h>
 #include <linux/pm_runtime.h>
Signature · 1 line
2.39.0
maintainer
#1 lore raw
Quoted 5 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

The newly added gpio consumer calls cause a build failure in configurations that fail to include the right header implicitly:

I think it would be better to say what you have done exactly to make sure that developers will run it before they send the patch.

Quoted 18 lines

drivers/usb/dwc3/dwc3-xilinx.c: In function 'dwc3_xlnx_init_zynqmp':
drivers/usb/dwc3/dwc3-xilinx.c:207:22: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_clk_get_optional'? [-Werror=implicit-function-declaration]

   207 |         reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
       |                      ^~~~~~~~~~~~~~~~~~~~~~~
       |                      devm_clk_get_optional
Fixes ca05b38252d7 ("usb: dwc3: xilinx: Add gpio-reset support")
---
  drivers/usb/dwc3/dwc3-xilinx.c | 1 +
  1 file changed, 1 insertion(+)
drivers/usb/dwc3/dwc3-xilinx.c +0 -0
index 8607d4c23283..0745e9f11b2e 100644

drivers/usb/dwc3/dwc3-xilinx.c line 17

Quoted 5 lines
drivers/usb/dwc3/dwc3-xilinx.c +1 -0
@@ -13,6 +13,7 @@
  #include <linux/of.h>
  #include <linux/platform_device.h>
  #include <linux/dma-mapping.h>
+#include <linux/gpio/consumer.h>
  #include <linux/of_gpio.h>

Origin patch added this header and I think it should be also removed as the part of this patch.

Quoted 5 lines
drivers/usb/dwc3/dwc3-xilinx.c +0 -1
  #include <linux/of_platform.h>
  #include <linux/pm_runtime.h>
--

2.39.0

Thanks,
Michal