Skip to contentSkip to conversation

PCI: amlogic: fix build failure due to missing linux/gpio/consumer.h header

PATCH In review Corentin Labbe 2 participants 4 messages Jan 4, 2019

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

PATCH 1/1 PCI: amlogic: fix build failure due to missing linux/gpio/consumer.h header

When building on x86, I got the following build failure:
drivers/pci/controller/dwc/pci-meson.c: In function ‘meson_pcie_assert_reset’:
drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(mp->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
drivers/pci/controller/dwc/pci-meson.c: In function ‘meson_pcie_probe’:
drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]

  mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                   ^~~~~~~~~~~~~~
                   devm_gpio_free
drivers/pci/controller/dwc/pci-meson.c:540:48: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
  mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                                                ^~~~~~~~~~~~~
                                                GPIOF_INIT_LOW

This is due to the missing linux/gpio/consumer.h header

---
 drivers/pci/controller/dwc/pci-meson.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pci-meson.c +1 -0
index 241ebe0c4505..e35e9eaa50ee 100644
@@ -8,6 +8,7 @@
 
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/gpio/consumer.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 #include <linux/pci.h>
Signature · 1 line
2.19.2
#1 lore raw
Quoted 1 line · Corentin Labbe

When building on x86, I got the following build failure:

Hi,

what tree are you testing on and which config ?

Thanks,
Lorenzo

Quoted 37 lines

drivers/pci/controller/dwc/pci-meson.c: In function ‘meson_pcie_assert_reset’:
drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(mp->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
drivers/pci/controller/dwc/pci-meson.c: In function ‘meson_pcie_probe’:
drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]

  mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                   ^~~~~~~~~~~~~~
                   devm_gpio_free
drivers/pci/controller/dwc/pci-meson.c:540:48: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
  mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                                                ^~~~~~~~~~~~~
                                                GPIOF_INIT_LOW

This is due to the missing linux/gpio/consumer.h header

---
 drivers/pci/controller/dwc/pci-meson.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pci-meson.c +1 -0
index 241ebe0c4505..e35e9eaa50ee 100644
@@ -8,6 +8,7 @@
 
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/gpio/consumer.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 #include <linux/pci.h>
Signature · 1 line
2.19.2
#2 lore raw
Quoted 6 lines · Lorenzo Pieralisi
Quoted 1 line · Corentin Labbe

When building on x86, I got the following build failure:

Hi,

what tree are you testing on and which config ?

I use the next-20190102 tree
The config can be found at http://kernel.montjoie.ovh/configs/x86

Regards

Quoted 41 lines

Thanks,
Lorenzo

Quoted 37 lines

drivers/pci/controller/dwc/pci-meson.c: In function ‘meson_pcie_assert_reset’:
drivers/pci/controller/dwc/pci-meson.c:290:2: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(mp->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
drivers/pci/controller/dwc/pci-meson.c: In function ‘meson_pcie_probe’:
drivers/pci/controller/dwc/pci-meson.c:540:19: error: implicit declaration of function ‘devm_gpiod_get’; did you mean ‘devm_gpio_free’? [-Werror=implicit-function-declaration]

  mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                   ^~~~~~~~~~~~~~
                   devm_gpio_free
drivers/pci/controller/dwc/pci-meson.c:540:48: error: ‘GPIOD_OUT_LOW’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_LOW’?
  mp->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
                                                ^~~~~~~~~~~~~
                                                GPIOF_INIT_LOW

This is due to the missing linux/gpio/consumer.h header

---
 drivers/pci/controller/dwc/pci-meson.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/controller/dwc/pci-meson.c +1 -0
index 241ebe0c4505..e35e9eaa50ee 100644
@@ -8,6 +8,7 @@
 
 #include <linux/clk.h>
 #include <linux/delay.h>
+#include <linux/gpio/consumer.h>
 #include <linux/of_device.h>
 #include <linux/of_gpio.h>
 #include <linux/pci.h>
Signature · 1 line
2.19.2
#3 lore raw
Quoted 10 lines · LABBE Corentin
Quoted 6 lines · Lorenzo Pieralisi
Quoted 1 line · Corentin Labbe

When building on x86, I got the following build failure:

Hi,

what tree are you testing on and which config ?

I use the next-20190102 tree
The config can be found at http://kernel.montjoie.ovh/configs/x86

Ok, right, it is a config that unfortunately the bots failed to test, I will pick this up and send it to Bjorn for -rc2 (given that the PCI tree is not in mainline yet).

Thanks,
Lorenzo